using Microsoft.Win32;
using SM.core;
using SS;
using SS.core;
using SS.dir;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using TVSBH.core;
using TVSGPP.dir;
using TVSGPP.doctor;
using TVSGPP.func;
using TVSGPP.search;
using TVSGPP.sys;
namespace TVSBH.func
{
	public class frmOutputRetail : Form
	{
		private frmWaitting objW;
		private Func objFunc = new Func();
		private Account objAccount = new Account();
		private DataTable objTable = new DataTable();
		private DataTable objTableBill = new DataTable();
		private Bill objBill = new Bill();
		private Partner objPartner = new Partner();
		public string userName = "";
		public string fullName = "";
		public string currCustomer = "";
		private string currPid = "";
		private string currIdRegisters = "";
		private string currIdControl = "";
		private string currIdBisMake = "";
		private string currIdBisImport = "";
		private string cusID = "";
		private string perfixOutRetail = "";
		private string currWhID = "";
		private customers objCus = new customers();
		private products objProduct = new products();
		private bool sellOnPublicPrice = false;
		private bool isPostBack = false;
		private bool noAllowOtherEditBill = false;
		private bool AllowSellExpired = false;
		private bool BasePrice = false;
		private bool FixedStockRetail = false;
		private bool AllowSellSuppen = false;
		private bool AllowDouble = false;
		private bool updateDataWithSlideShow = false;
		private bool setFocusCustomer = false;
		private bool printUsage = false;
		private bool allowEditPrice = false;
		private double currPrice = 0.0;
		private double currRate = 1.0;
		private double currVAT = 0.0;
		private int currIndex = -1;
		private int slideShowIndex = -1;
		private int Direction = 1;
		private int saveInterval = 0;
		private int saveIntervalCondition = 0;
		private int sizePaper = 0;
		private int currBillIndex = 0;
		private InOutBill objInOutBill = new InOutBill();
		private IContainer components = null;
		private GroupBox groupBox3;
		private DataGridView dgvBill;
		private Button btnClose;
		private Button btnDel;
		private Button btnPrint;
		private Button btnSave;
		private Button btnEdit;
		private Button btnAdd;
		private DataGridView dgvProduct;
		private GroupBox groupBox1;
		private TextBox txtTotalMoney;
		private Label label7;
		private Label label2;
		private DateTimePicker txtDate;
		private TextBox txtID;
		private Label label1;
		private Label label3;
		private TextBox txtName;
		private ComboBox cbbSex;
		private TextBox txtAge;
		private Label label5;
		private Label label6;
		private Label label8;
		private TextBox txtAddress;
		private TextBox txtPhone;
		private TextBox txtNote;
		private Label label9;
		private Button btnSelect;
		private Button btnAddToBill;
		private DateTimePicker dptProductExpiryDate;
		private Label label16;
		private DateTimePicker dtpProductDate;
		private Label label15;
		private TextBox txtProductPrice;
		private TextBox txtProductMoney;
		private Label label12;
		private TextBox txtProductNumber;
		private TextBox txtProductUnit;
		private TextBox txtProductName;
		private ComboBox cbbPacket;
		private TextBox txtBarcode;
		private ComboBox cbbNational;
		private Label label20;
		private Label label21;
		private TextBox txtBalancer;
		private Button btnSearch;
		private TextBox txtDoctorDesease;
		private Label label4;
		private Button btnFind;
		private Label lblPossName;
		private Label label22;
		private Button btnListUnit;
		private ContextMenuStrip cmsBill;
		private ToolStripMenuItem cmsDelProduct;
		private ToolStripSeparator toolStripSeparator1;
		private ToolStripMenuItem cmsAddBill;
		private ToolStripMenuItem cmsEditBill;
		private ToolStripSeparator toolStripSeparator2;
		private ToolStripMenuItem cmsSaveBill;
		private ToolStripMenuItem cmsPrintBill;
		private ToolStripMenuItem cmsDellBill;
		private ToolStripSeparator toolStripSeparator3;
		private ToolStripMenuItem cmsSearchBill;
		private ToolStripMenuItem cmsAddProduct;
		private ToolStripSeparator toolStripSeparator4;
		private Label label17;
		private Button btnSearchTime;
		private DateTimePicker dtpTo;
		private DateTimePicker dtpFrom;
		private TextBox txtBalancerAllPacket;
		private ComboBox cbbWareHouse;
		private Label label26;
		private GroupBox groupBox4;
		private Label label24;
		private Button lblProduct;
		private Button lblPrice;
		private Button lblMoney;
		private Button lblNumber;
		private Button lblUnit;
		private Button lblPacket;
		private Label label19;
		private Label label27;
		private TextBox txtMoney;
		private Label label10;
		private TextBox txtMoneyAfterDiscount;
		private TextBox txtDiscountOut;
		private Label label11;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
		private DataGridViewTextBoxColumn Column10;
		private DataGridViewTextBoxColumn Column11;
		private DataGridViewTextBoxColumn Column12;
		private DataGridViewTextBoxColumn Column13;
		private DataGridViewTextBoxColumn Column14;
		private DataGridViewTextBoxColumn Column15;
		private DataGridViewTextBoxColumn Column16;
		private DataGridViewTextBoxColumn Column17;
		private DataGridViewTextBoxColumn Column18;
		private DataGridViewTextBoxColumn Column19;
		private DataGridViewTextBoxColumn Column24;
		private DataGridViewTextBoxColumn Column25;
		private DataGridViewTextBoxColumn Column26;
		private DataGridViewTextBoxColumn _DoctorDesease;
		private DataGridViewTextBoxColumn _CusFreeID;
		private ToolTip toolTip1;
		private ContextMenuStrip ctmJustBill;
		private ToolStripMenuItem ctmJustBillAdd;
		private ToolStripMenuItem ctmJustBillEdit;
		private ToolStripMenuItem ctmJustBillPrint;
		private ToolStripSeparator toolStripSeparator5;
		private ToolStripMenuItem ctmJustBillDel;
		private ToolStripSeparator toolStripSeparator6;
		private ToolStripMenuItem ctmJustBillSearch;
		private Button btnStopSlide;
		private System.Windows.Forms.Timer timer2;
		private System.Windows.Forms.Timer timer1;
		private ToolStripMenuItem mnuPrintUsage;
		private TextBox txtTotalVAT;
		private Label label13;
		private Button button1;
		private TextBox txtVAT;
		private Button button2;
		private Label label14;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn8;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn9;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn10;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn11;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn12;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn13;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn14;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn15;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn16;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn17;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn18;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn19;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn20;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn21;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn22;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn23;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn24;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn25;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn26;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn27;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn28;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn29;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn30;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn31;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn32;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn33;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn34;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn35;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn36;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn37;
		private DataGridViewTextBoxColumn Column2;
		private DataGridViewTextBoxColumn Column1;
		private DataGridViewTextBoxColumn Column3;
		private DataGridViewTextBoxColumn Column4;
		private DataGridViewTextBoxColumn Column5;
		private DataGridViewTextBoxColumn VATasMoney;
		private DataGridViewTextBoxColumn Column6;
		private DataGridViewTextBoxColumn Column7;
		private DataGridViewTextBoxColumn Column8;
		private DataGridViewTextBoxColumn Column9;
		private DataGridViewTextBoxColumn Column20;
		private DataGridViewTextBoxColumn Column21;
		private DataGridViewTextBoxColumn Column22;
		private DataGridViewTextBoxColumn Column23;
		private DataGridViewTextBoxColumn possName;
		private DataGridViewTextBoxColumn Rate;
		private DataGridViewTextBoxColumn IdRegisters;
		private DataGridViewTextBoxColumn IdControl;
		private DataGridViewTextBoxColumn IdBisMake;
		private DataGridViewTextBoxColumn IdBisImport;
		private DataGridViewTextBoxColumn BarCode;
		private Label label18;
		private Label label29;
		private Label label23;
		private DataGridViewTextBoxColumn dataGridViewTextBoxColumn38;
		private void showWatting()
		{
			this.objW = new frmWaitting();
			this.objW.ShowDialog();
			Thread.Sleep(40);
		}
		public frmOutputRetail()
		{
			this.InitializeComponent();
		}
		private void frmOutputRetail_Load(object sender, EventArgs e)
		{
			try
			{
				RegistryKey registryKey = Registry.CurrentUser.OpenSubKey("Software\\TVSGPP", true);
				this.sizePaper = int.Parse(registryKey.GetValue("BillRetailZisePaper").ToString());
				this.setFocusCustomer = bool.Parse(registryKey.GetValue("SetFocusRetail").ToString());
				this.printUsage = bool.Parse(registryKey.GetValue("PrintUsage").ToString());
				registryKey.Close();
			}
			catch
			{
				this.setFocusCustomer = false;
				this.printUsage = false;
			}
			this.currWhID = this.objFunc.getWarehouse(this.userName);
			this.FixedStockRetail = this.objFunc.GetFixedStockRetail();
			this.cbbSex.SelectedIndex = 0;
			this.cusID = this.objCus.getRetailID();
			this.objFunc.LoadComboBox("SELECT [ID], UPPER(Name) AS Name FROM [TabNational] ORDER BY [Name]", this.cbbNational, "ID", "Name");
			this.objFunc.LoadComboBox("SELECT WareHouse_ID, UPPER(WareHouse_Name) AS Name FROM TabWareHouse ORDER BY WareHouse_Name", this.cbbWareHouse, "WareHouse_ID", "Name");
			if (this.FixedStockRetail)
			{
				this.cbbWareHouse.SelectedValue = this.currWhID;
				this.cbbWareHouse.Enabled = false;
			}
			this.getBill("");
			this.sellOnPublicPrice = this.objFunc.getSellOnPublicPrice();
			this.noAllowOtherEditBill = this.objFunc.getNoAllowOtherEditBill();
			this.AllowSellExpired = this.objFunc.getAllowSellExpired();
			this.perfixOutRetail = this.objFunc.GetPerfixOutRetail();
			this.AllowDouble = this.objFunc.getAllowDouble();
			this.BasePrice = this.objFunc.getBasePrice();
			this.AllowSellSuppen = this.objFunc.getAllowSellSuppen();
			this.allowEditPrice = this.objFunc.getAllowEditPrice();
			if (this.allowEditPrice && this.objAccount.checkPerExtention(this.userName, "EditPrice"))
			{
				this.txtProductPrice.ReadOnly = false;
			}
			else
			{
				this.txtProductPrice.ReadOnly = true;
			}
			this.btnAdd.PerformClick();
		}
		private void btnClose_Click(object sender, EventArgs e)
		{
			base.Close();
		}
		private void frmOutputRetail_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Escape)
			{
				base.Close();
			}
			else
			{
				if (e.KeyCode == Keys.F2)
				{
					this.btnSelect.PerformClick();
				}
				else
				{
					if (e.KeyCode == Keys.F3)
					{
						this.btnAddToBill.PerformClick();
					}
					else
					{
						if (e.KeyCode == Keys.F4)
						{
							this.btnAdd.PerformClick();
						}
						else
						{
							if (e.KeyCode == Keys.F5)
							{
								this.btnEdit.PerformClick();
							}
							else
							{
								if (e.KeyCode == Keys.F6)
								{
									this.btnSave.PerformClick();
								}
								else
								{
									if (e.KeyCode == Keys.F7)
									{
										this.btnPrint.PerformClick();
									}
									else
									{
										if (e.KeyCode == Keys.F8)
										{
											this.btnDel.PerformClick();
										}
										else
										{
											if (e.KeyCode == Keys.F9)
											{
												this.btnSearch.PerformClick();
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
		private void btnSave_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.dgvProduct.Rows.Count == 0)
				{
					MessageBox.Show("Nhập thông tin chi tiết về đơn hàng trước khi lưu", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
				else
				{
					if (this.currCustomer == "" && this.txtName.Text != "")
					{
						if (this.objCus.existsNameCustomerFree(this.txtName.Text))
						{
							if (MessageBox.Show("Khách hàng có tên " + this.txtName.Text.ToUpper() + " đã tồn tại trên hệ thống!\r\nNếu bạn muốn thêm tên này như một khách hàng mới, nhấn NO\r\n\r\n Nếu muốn chọn thông tin từ hệ thống, nhấn YES", "", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
							{
								frmFindCustomerFree frmFindCustomerFree = new frmFindCustomerFree();
								frmFindCustomerFree.ShowDialog();
								if (frmFindCustomerFree._Name.Trim() != "")
								{
									this.currCustomer = frmFindCustomerFree._ID;
									this.txtName.Text = frmFindCustomerFree._Name;
									this.txtAddress.Text = frmFindCustomerFree._Address;
									this.txtPhone.Text = frmFindCustomerFree._Phone;
									this.txtAge.Text = frmFindCustomerFree._Age;
									this.cbbSex.SelectedValue = frmFindCustomerFree._Gender;
								}
							}
						}
					}
					if (this.txtID.Text.Trim() == "")
					{
						this.txtID.Text = "NEW";
					}
					if (this.txtAge.Text == "")
					{
						this.txtAge.Text = "0";
					}
					else
					{
						try
						{
							int num = int.Parse(this.txtAge.Text);
						}
						catch
						{
							MessageBox.Show("Tuổi của khách hàng phải là một số nguyên?", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							return;
						}
					}
					if (!this.btnEdit.Enabled)
					{
						if (this.objBill.checkID(this.txtID.Text))
						{
							MessageBox.Show("Hoá đơn có số hiệu \"" + this.txtID.Text + "\" đã tồn tại!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
							this.txtID.Focus();
							return;
						}
					}
					if (this.objBill.action(this.txtID.Text, this.txtDate.Value, float.Parse(this.txtMoney.Text.Replace(",", "")), "OUT4", this.cbbWareHouse.SelectedValue.ToString(), this.txtNote.Text, this.cusID, this.objTable, this.txtName.Text, int.Parse(this.txtAge.Text), this.cbbSex.SelectedIndex, this.txtAddress.Text, this.txtPhone.Text, "OUT4", this.userName, this.fullName, this.txtDoctorDesease.Text, this.currCustomer, float.Parse(this.txtDiscountOut.Text), float.Parse(this.txtTotalMoney.Text)) == 1)
					{
						MessageBox.Show("Có lỗi xảy ra trong quá trình lưu hoá đơn", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						this.txtID.Focus();
					}
					else
					{
						string text = this.objInOutBill.getBillIDWithObject(this.txtID.Text);
						if (text.Trim() == "")
						{
							text = this.objInOutBill.getOutBillID("IN");
						}
						this.objInOutBill.action(text, this.txtDate.Value, double.Parse(this.txtTotalMoney.Text), "IN", this.txtNote.Text, this.txtID.Text, this.txtName.Text, this.userName, this.fullName, this.txtDate.Value);
						if (!this.btnStopSlide.Visible)
						{
							this.getBill("");
							this.btnEdit.Enabled = true;
							this.btnDel.Enabled = true;
							this.btnSave.Enabled = false;
							this.txtName.ReadOnly = true;
							this.btnFind.Enabled = false;
							this.currCustomer = "";
							this.txtAge.ReadOnly = true;
							this.txtAddress.ReadOnly = true;
							this.txtPhone.ReadOnly = true;
							this.txtNote.ReadOnly = true;
							this.txtDoctorDesease.ReadOnly = true;
							this.cbbSex.Enabled = false;
							this.btnAdd.PerformClick();
						}
						else
						{
							this.btnEdit.Enabled = true;
							this.btnDel.Enabled = true;
							this.btnSave.Enabled = false;
							this.txtName.ReadOnly = true;
							this.btnFind.Enabled = false;
							this.currCustomer = "";
							this.txtAge.ReadOnly = true;
							this.txtAddress.ReadOnly = true;
							this.txtPhone.ReadOnly = true;
							this.txtNote.ReadOnly = true;
							this.txtDoctorDesease.ReadOnly = true;
							this.cbbSex.Enabled = false;
							this.timer2.Stop();
						}
					}
				}
			}
			catch
			{
				MessageBox.Show("Lỗi : - Việc lưu hoá đơn không thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
		}
		private void getBill(string sql_Search)
		{
			try
			{
				this.dgvBill.AutoGenerateColumns = false;
				SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
				string cmdText;
				if (sql_Search == "")
				{
					cmdText = "SELECT * FROM [TabBill] WHERE [_DoctorName] = 'NONE' AND TypeInput = 'OUT4' AND CreateDate BETWEEN @ObjDate1 AND @objDate2 ORDER BY [CreateDate] DESC";
				}
				else
				{
					cmdText = sql_Search + " AND [TabBill].[CreateDate] BETWEEN @ObjDate1 AND @objDate2 ORDER BY [TabBill].[CreateDate] DESC";
				}
				SqlCommand sqlCommand = new SqlCommand(cmdText, sqlConnection);
				SqlParameter sqlParameter = new SqlParameter("ObjDate1", SqlDbType.DateTime);
				SqlParameter sqlParameter2 = new SqlParameter("ObjDate2", SqlDbType.DateTime);
				sqlParameter.Value = DateTime.Parse(this.dtpFrom.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
				sqlParameter2.Value = DateTime.Parse(this.dtpTo.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
				sqlCommand.Parameters.Add(sqlParameter);
				sqlCommand.Parameters.Add(sqlParameter2);
				SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(sqlCommand);
				DataSet dataSet = new DataSet();
				sqlConnection.Open();
				sqlDataAdapter.Fill(dataSet);
				this.objTableBill = dataSet.Tables[0];
				this.dgvBill.DataSource = this.objTableBill;
				sqlConnection.Close();
				sqlConnection.Dispose();
				sqlDataAdapter.Dispose();
				dataSet.Dispose();
			}
			catch
			{
			}
		}
		private void btnEdit_Click(object sender, EventArgs e)
		{
			if (this.userName.ToUpper() == "ADMIN" || !this.noAllowOtherEditBill || (this.noAllowOtherEditBill && this.objBill.getuserNameBillID(this.txtID.Text) == this.userName))
			{
				bool noEditAffterPrint = this.objFunc.getNoEditAffterPrint();
				if (!noEditAffterPrint || (noEditAffterPrint && !this.objBill.getPrinted(this.txtID.Text)))
				{
					this.btnSave.Enabled = true;
					this.btnDel.Enabled = true;
					this.btnSelect.Enabled = true;
					this.txtName.ReadOnly = false;
					this.btnFind.Enabled = true;
					this.txtAge.ReadOnly = false;
					this.txtAddress.ReadOnly = false;
					this.txtPhone.ReadOnly = false;
					this.txtNote.ReadOnly = false;
					this.txtDoctorDesease.ReadOnly = false;
					this.cbbSex.Enabled = true;
					this.txtBarcode.ReadOnly = false;
					if (this.allowEditPrice)
					{
						this.txtProductPrice.ReadOnly = false;
					}
					else
					{
						this.txtProductPrice.ReadOnly = true;
					}
					this.setStatusBtnAddToBill();
					this.txtProductNumber.ReadOnly = false;
					this.txtDiscountOut.ReadOnly = false;
					this.cbbPacket.Enabled = true;
					this.txtDiscountOut.ReadOnly = false;
					this.txtPhone.ReadOnly = false;
				}
				else
				{
					MessageBox.Show("Hoá đơn này đã được in! Bạn không thể sửa đổi", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			else
			{
				MessageBox.Show("Chỉ có người tạo ra hoá đơn mới có quyền sửa đổi", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
		}
		private void setStatusBtnAddToBill()
		{
			if (this.txtProductName.Text != "" && this.txtProductUnit.Text != "" && this.txtProductPrice.Text != "" && this.txtProductNumber.Text != "" && this.txtProductMoney.Text != "")
			{
				this.btnAddToBill.Enabled = true;
			}
			else
			{
				this.btnAddToBill.Enabled = false;
			}
		}
		private void btnAdd_Click(object sender, EventArgs e)
		{
			this.objTable = new DataTable();
			DataColumn column = new DataColumn("Pid", typeof(string));
			DataColumn column2 = new DataColumn("ProductName", typeof(string));
			DataColumn column3 = new DataColumn("ProductUnit", typeof(string));
			DataColumn column4 = new DataColumn("ProductNumber", typeof(string));
			DataColumn column5 = new DataColumn("ProductPrice", typeof(string));
			DataColumn column6 = new DataColumn("ProductMoney", typeof(string));
			DataColumn column7 = new DataColumn("Packet", typeof(string));
			DataColumn column8 = new DataColumn("ProductDate", typeof(DateTime));
			DataColumn column9 = new DataColumn("ProductExpiryDate", typeof(DateTime));
			DataColumn column10 = new DataColumn("ProductPrice1", typeof(string));
			DataColumn column11 = new DataColumn("ProductPrice2", typeof(string));
			DataColumn column12 = new DataColumn("NationalID", typeof(string));
			DataColumn column13 = new DataColumn("VAT", typeof(string));
			DataColumn column14 = new DataColumn("possName", typeof(string));
			DataColumn column15 = new DataColumn("Rate", typeof(string));
			DataColumn column16 = new DataColumn("IdRegisters", typeof(string));
			DataColumn column17 = new DataColumn("IdControl", typeof(string));
			DataColumn column18 = new DataColumn("IdBisMake", typeof(string));
			DataColumn column19 = new DataColumn("IdBisImport", typeof(string));
			DataColumn column20 = new DataColumn("VATasMoney", typeof(float));
			DataColumn column21 = new DataColumn("Barcode", typeof(string));
			this.objTable.Columns.Add(column);
			this.objTable.Columns.Add(column2);
			this.objTable.Columns.Add(column3);
			this.objTable.Columns.Add(column4);
			this.objTable.Columns.Add(column5);
			this.objTable.Columns.Add(column6);
			this.objTable.Columns.Add(column7);
			this.objTable.Columns.Add(column8);
			this.objTable.Columns.Add(column9);
			this.objTable.Columns.Add(column10);
			this.objTable.Columns.Add(column11);
			this.objTable.Columns.Add(column12);
			this.objTable.Columns.Add(column13);
			this.objTable.Columns.Add(column14);
			this.objTable.Columns.Add(column15);
			this.objTable.Columns.Add(column16);
			this.objTable.Columns.Add(column17);
			this.objTable.Columns.Add(column18);
			this.objTable.Columns.Add(column19);
			this.objTable.Columns.Add(column20);
			this.objTable.Columns.Add(column21);
			this.dgvProduct.AutoGenerateColumns = false;
			this.dgvProduct.DataSource = this.objTable;
			this.resetAllControl();
			this.btnSave.Enabled = true;
			this.btnEdit.Enabled = false;
			this.btnPrint.Enabled = false;
			this.btnDel.Enabled = false;
			this.btnSelect.Enabled = true;
			this.txtName.ReadOnly = false;
			this.btnFind.Enabled = true;
			this.txtAge.ReadOnly = false;
			this.txtAddress.ReadOnly = false;
			this.txtPhone.ReadOnly = false;
			this.txtNote.ReadOnly = false;
			this.cbbSex.Enabled = true;
			this.txtBarcode.ReadOnly = false;
			this.txtProductNumber.ReadOnly = false;
			if (this.allowEditPrice)
			{
				this.txtProductPrice.ReadOnly = false;
			}
			else
			{
				this.txtProductPrice.ReadOnly = true;
			}
			this.txtDiscountOut.ReadOnly = false;
			this.cbbPacket.Enabled = true;
			this.txtDiscountOut.ReadOnly = false;
			this.currCustomer = "";
		}
		private void resetAllControl()
		{
			this.txtID.Text = "";
			this.txtID.ReadOnly = false;
			this.txtDate.Value = DateTime.Now;
			this.txtTotalMoney.Text = "0";
			this.txtNote.Text = "";
			this.txtProductNumber.Text = "";
			this.txtProductName.Text = "";
			this.txtProductUnit.Text = "";
			this.txtProductPrice.Text = "";
			this.txtProductMoney.Text = "";
			this.txtDoctorDesease.Text = "";
			this.txtDiscountOut.Text = "0";
			this.currPid = "0";
			this.txtName.Text = "";
			this.btnFind.Enabled = true;
			this.txtAge.Text = "";
			this.txtAddress.Text = "";
			this.txtPhone.Text = "";
			this.txtBarcode.Text = "";
			if (this.setFocusCustomer)
			{
				this.txtName.Focus();
			}
			else
			{
				this.txtProductName.Focus();
			}
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmOutputRetailBill.objTable = new DataTable();
			try
			{
				frmOutputRetailBill.MoneyByWord = "Số tiền bằng chữ : " + this.objFunc.changeNumberToWord1(long.Parse(this.txtTotalMoney.Text.Replace(",", "")));
			}
			catch
			{
				frmOutputRetailBill.MoneyByWord = "";
			}
			if (this.sizePaper == 0)
			{
				frmOutRetailBillView frmOutRetailBillView = new frmOutRetailBillView();
				frmOutRetailBillView.billID = this.txtID.Text;
				frmOutRetailBillView.billDate = this.txtDate.Text;
				frmOutRetailBillView.billNote = this.txtNote.Text;
				frmOutRetailBillView.billTotalMoney = this.txtTotalMoney.Text;
				frmOutRetailBillView.cusName = this.txtName.Text;
				frmOutRetailBillView.cusAddress = this.txtAddress.Text;
				frmOutRetailBillView.cusPhone = this.txtPhone.Text;
				double num = double.Parse(this.txtTotalMoney.Text);
				frmOutRetailBillView.ALl = num.ToString();
				frmOutputRetailBill.totalVAT = this.txtTotalVAT.Text;
				frmOutputRetailBill.objTable = this.objTable;
				frmOutputRetailBill.Discount = "";
				frmOutputRetailBill.Discount = this.txtMoneyAfterDiscount.Text;
				try
				{
					frmOutputRetailBill.MoneyByWord = "Số tiền bằng chữ : " + this.objFunc.changeNumberToWord1(long.Parse(num.ToString())) + "/  ";
				}
				catch
				{
					frmOutputRetailBill.MoneyByWord = "";
				}
				frmOutRetailBillView.ShowDialog();
				if (this.printUsage)
				{
					if (this.txtID.Text != "" && this.dgvProduct.Rows.Count > 0)
					{
						new frmPrintUsage
						{
							lblBillID = 
							{
								Text = this.txtID.Text
							}
						}.ShowDialog();
					}
				}
			}
			else
			{
				frmOutRetailBillK80View frmOutRetailBillK80View = new frmOutRetailBillK80View();
				frmOutRetailBillK80View.billID = this.txtID.Text;
				frmOutRetailBillK80View.billDate = this.txtDate.Text;
				frmOutRetailBillK80View.billNote = this.txtNote.Text;
				frmOutRetailBillK80View.billTotalMoney = this.txtTotalMoney.Text;
				frmOutRetailBillK80View.cusName = this.txtName.Text;
				frmOutRetailBillK80View.cusAddress = this.txtAddress.Text;
				frmOutRetailBillK80View.cusPhone = this.txtPhone.Text;
				frmOutputRetailBillK80.totalVAT = this.txtTotalVAT.Text;
				double num = double.Parse(this.txtTotalMoney.Text);
				frmOutRetailBillK80View.ALl = num.ToString();
				frmOutputRetailBillK80.objTable = this.objTable;
				frmOutputRetailBillK80.Discount = "";
				frmOutputRetailBillK80.Discount = this.txtMoneyAfterDiscount.Text;
				try
				{
					frmOutputRetailBillK80.MoneyByWord = "Số tiền bằng chữ : " + this.objFunc.changeNumberToWord1(long.Parse(num.ToString())) + "/  ";
				}
				catch
				{
					frmOutputRetailBillK80.MoneyByWord = "";
				}
				frmOutRetailBillK80View.ShowDialog();
			}
			try
			{
				this.dgvProduct.Columns["TT"].Visible = false;
			}
			catch
			{
			}
			this.objBill.setPrinted(this.txtID.Text);
		}
		private void btnDel_Click(object sender, EventArgs e)
		{
			if (MessageBox.Show("Bạn có chắc chắn muốn xoá hoá đơn [ " + this.txtID.Text.ToUpper() + " ] không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
			{
				this.objBill.delItem(this.txtID.Text);
				try
				{
					this.dgvProduct.DataSource = null;
					this.dgvBill.Rows.RemoveAt(this.currBillIndex);
				}
				catch
				{
					this.getBill("");
				}
			}
		}
		private void btnSelect_Click(object sender, EventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				this.txtBarcode.Text = "";
				frmSelectProductCode frmSelectProductCode = new frmSelectProductCode();
				frmSelectProductCode.Width = this.txtProductName.Width + this.cbbPacket.Width + 2;
				frmSelectProductCode.txtSearch.Text = this.txtProductName.Text;
				frmSelectProductCode.Location = new System.Drawing.Point(this.txtProductName.Location.X + 94, this.txtProductName.Location.Y + 80);
				frmSelectProductCode.ShowDialog();
				if (frmSelectProductCode.productID != "")
				{
					this.currPid = frmSelectProductCode.productID;
					if (this.txtProductName.Text.Trim() != "" && this.cbbPacket.Items.Count == 0)
					{
						this.objFunc.loadPacketIntoComboBox("SELECT DISTINCT [Packet], [ProductExpiryDate] FROM [TabDetailBill] WHERE [Pid] = " + this.currPid + " AND dbo.uf_getBalancerProductByPacket(Pid,Packet) > 0 ORDER BY [ProductExpiryDate]", this.cbbPacket, "Packet", "Packet");
					}
					this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
					this.txtProductName.Text = frmSelectProductCode.productName;
					this.txtProductUnit.Text = frmSelectProductCode.unitName;
					this.currRate = 1.0;
					this.lblPossName.Text = frmSelectProductCode.productPossName;
					try
					{
						if (this.BasePrice)
						{
							this.txtProductPrice.Text = this.objProduct.getPriceOutRetailBase(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
						}
						else
						{
							this.txtProductPrice.Text = this.objProduct.getPriceOutRetailAVG(this.currPid).ToString();
						}
						this.currPrice = (double)float.Parse(this.txtProductPrice.Text.Replace(",", ""));
						this.cbbNational.SelectedValue = this.objProduct.getNationalID(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
					}
					catch
					{
						this.txtProductName.Text = "";
						this.txtProductUnit.Text = "";
						MessageBox.Show("Không tìm thấy lô hàng nào của sản phẩm được chọn\r\n\r\nChỉ những sản phẩm có số lô cụ thể mới được xuất kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						return;
					}
					if (this.txtProductNumber.Text == "" || this.txtProductNumber.Text == "0")
					{
						this.txtProductNumber.Text = "1";
					}
					this.cbbPacket.Focus();
					this.cbbPacket.SelectedValue = frmSelectProductCode.packet;
				}
			}
		}
		private void btnAddToBill_Click(object sender, EventArgs e)
		{
			if (DateTime.Parse(this.dptProductExpiryDate.Value.ToShortDateString()) >= DateTime.Parse(DateTime.Now.ToShortDateString()) && !this.AllowSellExpired)
			{
				MessageBox.Show("Không thể bán sản phẩm đã quá hạn sử dụng!", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
			}
			else
			{
				if (this.txtProductNumber.Text == "0")
				{
					MessageBox.Show("Nhập vào số lượng sản phẩm cần xuất kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					this.txtProductNumber.Focus();
				}
				else
				{
					if (this.txtProductNumber.Text.Contains("-") || this.txtBalancer.Text.Contains("-"))
					{
						MessageBox.Show("Số lượng xuất và số lượng tồn phải không âm", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
					else
					{
						double pricePublicBase = this.objProduct.getPricePublicBase(this.currPid, this.cbbPacket.Text);
						if (!this.sellOnPublicPrice && double.Parse(this.txtProductPrice.Text) > pricePublicBase)
						{
							MessageBox.Show("Giá bán hiện tại cao hơn giá đã niêm yết [" + string.Format("{0,0:0}", pricePublicBase) + "]\r\n\r\nHệ thống không cho phép bán giá cao hơn giá đã niêm yết!", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						}
						else
						{
							if (this.txtProductNumber.Text == "" || this.txtProductNumber.Text == "0")
							{
								MessageBox.Show("Nhập vào số lượng sản phẩm cần xuất kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								this.txtProductNumber.Focus();
							}
							else
							{
								float num = float.Parse(this.txtProductNumber.Text);
								float num2 = float.Parse(this.txtBalancerAllPacket.Text);
								float num3 = float.Parse(this.txtBalancer.Text);
								float num4 = 0f;
								if (num > num2)
								{
									MessageBox.Show("Số lượng xuất kho lớn hơn số lượng hàng còn trong kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
									this.txtProductNumber.Text = this.txtBalancerAllPacket.Text;
								}
								else
								{
									int num5 = this.checkInObjTable(this.currPid, this.cbbPacket.Text);
									if (num5 == -1 || this.AllowDouble)
									{
										if (num <= num3)
										{
											this.objTable.Rows.Add(new object[]
											{
												this.currPid,
												this.txtProductName.Text,
												this.txtProductUnit.Text,
												this.txtProductNumber.Text.Replace(",", ""),
												"0",
												string.Format(Program.lenAffterDecimal, double.Parse(this.txtProductNumber.Text.Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) + double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
												this.cbbPacket.Text,
												this.dtpProductDate.Value,
												this.dptProductExpiryDate.Value,
												"0",
												this.txtProductPrice.Text.Replace(",", ""),
												this.cbbNational.SelectedValue.ToString(),
												"0",
												this.lblPossName.Text,
												this.currRate.ToString(),
												this.currIdRegisters,
												this.currIdControl,
												this.currIdBisMake,
												this.currIdBisImport,
												string.Format(Program.lenAffterDecimal, double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
												this.txtBarcode.Text
											});
										}
										else
										{
											num4 += num3;
											this.objTable.Rows.Add(new object[]
											{
												this.currPid,
												this.txtProductName.Text,
												this.txtProductUnit.Text,
												num3.ToString(),
												"0",
												string.Format(Program.lenAffterDecimal, (double)num3 * double.Parse(this.txtProductPrice.Text.Replace(",", "")) + double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
												this.cbbPacket.Text,
												this.dtpProductDate.Value,
												this.dptProductExpiryDate.Value,
												"0",
												this.txtProductPrice.Text.Replace(",", ""),
												this.cbbNational.SelectedValue.ToString(),
												"0",
												this.lblPossName.Text,
												this.currRate.ToString(),
												this.currIdRegisters,
												this.currIdControl,
												this.currIdBisMake,
												this.currIdBisImport,
												string.Format(Program.lenAffterDecimal, double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
												this.txtBarcode.Text
											});
											try
											{
												SqlConnection sqlConnection = new SqlConnection(this.objFunc.strConnectionString);
												sqlConnection.Open();
												SqlCommand sqlCommand = sqlConnection.CreateCommand();
												sqlCommand.CommandText = string.Concat(new string[]
												{
													"SELECT DISTINCT [Packet], [ProductDate], [ProductExpiryDate], [NationalID] FROM [TabDetailBill] WHERE [Pid] = ",
													this.currPid,
													" AND [Packet] <> '",
													this.cbbPacket.SelectedValue.ToString(),
													"' AND [Packet] IN (SELECT [Packet] FROM [TabTotalBalancer] WHERE [Pid] = ",
													this.currPid,
													" AND (productNumberIn > productNumberOut)) ORDER BY [ProductExpiryDate] DESC"
												});
												SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
												while (sqlDataReader.Read() && num4 < num)
												{
													float num6 = this.objProduct.balancerOfPack(this.currPid, sqlDataReader["Packet"].ToString(), this.cbbWareHouse.SelectedValue.ToString());
													if (num6 >= num - num4)
													{
														this.objTable.Rows.Add(new object[]
														{
															this.currPid,
															this.txtProductName.Text,
															this.txtProductUnit.Text,
															(num - num4).ToString(),
															"0",
															string.Format(Program.lenAffterDecimal, double.Parse((num - num4).ToString()) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) + double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
															sqlDataReader["Packet"].ToString(),
															sqlDataReader["ProductDate"].ToString(),
															sqlDataReader["ProductExpiryDate"].ToString(),
															"0",
															this.txtProductPrice.Text.Replace(",", ""),
															sqlDataReader["NationalID"].ToString(),
															"0",
															this.lblPossName.Text,
															this.currRate.ToString(),
															this.currIdRegisters,
															this.currIdControl,
															this.currIdBisMake,
															this.currIdBisImport,
															string.Format(Program.lenAffterDecimal, double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
															this.txtBarcode.Text
														});
														num4 += num - num4;
													}
													else
													{
														num4 += num6;
														this.objTable.Rows.Add(new object[]
														{
															this.currPid,
															this.txtProductName.Text,
															this.txtProductUnit.Text,
															num6.ToString(),
															"0",
															string.Format(Program.lenAffterDecimal, double.Parse(num6.ToString()) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) + double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
															sqlDataReader["Packet"].ToString(),
															sqlDataReader["ProductDate"].ToString(),
															sqlDataReader["ProductExpiryDate"].ToString(),
															"0",
															this.txtProductPrice.Text.Replace(",", ""),
															sqlDataReader["NationalID"].ToString(),
															"0",
															this.lblPossName.Text,
															this.currRate.ToString(),
															this.currIdRegisters,
															this.currIdControl,
															this.currIdBisMake,
															this.currIdBisImport,
															string.Format(Program.lenAffterDecimal, double.Parse(this.txtVAT.Text.Trim().Replace(",", ""))),
															this.txtBarcode.Text
														});
													}
												}
												sqlDataReader.Close();
												sqlConnection.Close();
												sqlConnection.Dispose();
											}
											catch
											{
											}
										}
										this.dgvProduct.Refresh();
										this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
										this.txtTotalVAT.Text = string.Format(Program.lenAffterDecimal, this.caculaterTotalVAT());
									}
									else
									{
										this.updateObjTable(num5);
										this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
										this.txtTotalVAT.Text = string.Format(Program.lenAffterDecimal, this.caculaterTotalVAT());
									}
									try
									{
										double num7 = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
										this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num7);
									}
									catch
									{
										this.txtMoneyAfterDiscount.Text = "0";
									}
									try
									{
										double num7 = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
										this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num7);
									}
									catch
									{
										this.txtTotalMoney.Text = "0";
									}
									if (this.txtBarcode.Text == "")
									{
										this.resetControl();
										this.txtProductName.Focus();
									}
									else
									{
										this.txtBarcode.Text = "";
										this.txtBarcode.Focus();
									}
								}
							}
						}
					}
				}
			}
		}
		private int checkInObjTable(string Pid, string Packet)
		{
			int num = -1;
			int result;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				if (this.objTable.Rows[i]["Pid"].ToString() == Pid && this.objTable.Rows[i]["Packet"].ToString() == Packet)
				{
					num = i;
					result = num;
					return result;
				}
			}
			result = num;
			return result;
		}
		private double checkMoneyOfBill()
		{
			double num = 0.0;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				num += double.Parse(this.objTable.Rows[i]["ProductMoney"].ToString());
			}
			return num;
		}
		private void updateObjTable(int index)
		{
			if (this.txtBarcode.Text == "")
			{
				if (float.Parse(this.txtProductNumber.Text) > float.Parse(this.txtBalancer.Text))
				{
					MessageBox.Show("Số lượng xuất kho lớn hơn số lượng hàng còn trong kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					this.txtProductNumber.Text = this.txtBalancer.Text;
				}
				else
				{
					this.objTable.Rows[index]["Pid"] = this.currPid;
					this.objTable.Rows[index]["ProductName"] = this.txtProductName.Text;
					this.objTable.Rows[index]["ProductUnit"] = this.txtProductUnit.Text;
					this.objTable.Rows[index]["ProductPrice2"] = this.txtProductPrice.Text;
					try
					{
						this.objTable.Rows[index]["ProductNumber"] = float.Parse(this.txtProductNumber.Text);
					}
					catch
					{
						this.objTable.Rows[index]["ProductNumber"] = this.txtProductNumber.Text;
					}
					this.objTable.Rows[index]["ProductMoney"] = string.Format(Program.lenAffterDecimal, double.Parse(this.objTable.Rows[index]["ProductNumber"].ToString().Replace(",", "")) * double.Parse(this.txtProductPrice.Text.Replace(",", "")) + double.Parse(this.txtVAT.Text.Trim().Replace(",", "")));
					this.objTable.Rows[index]["Packet"] = this.cbbPacket.Text;
					this.objTable.Rows[index]["ProductDate"] = this.dtpProductDate.Value;
					this.objTable.Rows[index]["ProductExpiryDate"] = this.dptProductExpiryDate.Value;
					this.objTable.Rows[index]["NationalID"] = this.cbbNational.SelectedValue.ToString();
					this.objTable.Rows[index]["VAT"] = "0";
					this.objTable.Rows[index]["possName"] = this.lblPossName.Text;
					this.objTable.Rows[index]["Rate"] = this.currRate.ToString();
					this.objTable.Rows[index]["VATasMoney"] = string.Format(Program.lenAffterDecimal, double.Parse(this.txtVAT.Text.Trim().Replace(",", "")));
				}
			}
			else
			{
				this.objTable.Rows[index]["ProductPrice2"] = this.txtProductPrice.Text;
				this.objTable.Rows[index]["ProductNumber"] = (float.Parse(this.objTable.Rows[index]["ProductNumber"].ToString()) + float.Parse(this.txtProductNumber.Text.Replace(",", ""))).ToString();
				if (float.Parse(this.objTable.Rows[index]["ProductNumber"].ToString()) > float.Parse(this.txtBalancer.Text))
				{
					MessageBox.Show("Số lượng xuất kho lớn hơn số lượng hàng còn trong kho", "Cảnh báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					this.txtProductNumber.Text = this.txtBalancer.Text;
					this.objTable.Rows[index]["ProductNumber"] = this.txtBalancer.Text;
				}
				else
				{
					this.objTable.Rows[index]["ProductMoney"] = string.Format(Program.lenAffterDecimal, double.Parse(this.objTable.Rows[index]["ProductPrice2"].ToString()) * double.Parse(this.objTable.Rows[index]["ProductNumber"].ToString()) + double.Parse(this.txtVAT.Text.Trim().Replace(",", "")));
					this.objTable.Rows[index]["possName"] = this.lblPossName.Text;
					this.objTable.Rows[index]["Rate"] = this.currRate.ToString();
					this.objTable.Rows[index]["VATasMoney"] = string.Format(Program.lenAffterDecimal, double.Parse(this.txtVAT.Text.Trim().Replace(",", "")));
				}
			}
		}
		private void resetControl()
		{
			this.txtProductNumber.Text = "0";
			this.txtProductName.Text = "";
			this.txtProductUnit.Text = "";
			this.txtProductPrice.Text = "0";
			this.txtProductNumber.Text = "0";
			this.txtProductMoney.Text = "0";
			this.txtBalancer.Text = "0";
			this.txtBalancerAllPacket.Text = "0";
			this.currPid = "0";
		}
		private void txtProductName_TextChanged(object sender, EventArgs e)
		{
			this.cbbPacket.DataSource = null;
			if (this.txtProductName.Text.Trim() != "")
			{
				this.objFunc.loadPacketIntoComboBox("SELECT DISTINCT [Packet], [ProductExpiryDate] FROM [TabDetailBill] WHERE [Pid] = " + this.currPid + " AND dbo.uf_getBalancerProductByPacket(Pid,Packet) > 0 ORDER BY [ProductExpiryDate]", this.cbbPacket, "Packet", "Packet");
			}
			try
			{
				if (!this.AllowSellSuppen && this.txtProductName.Text != "")
				{
					if (this.objProduct.checkForSuppend(this.currPid, this.cbbPacket.SelectedValue.ToString()))
					{
						MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + this.txtProductName.Text + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể xuất kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
						return;
					}
				}
			}
			catch
			{
			}
			this.setStatusBtnAddToBill();
		}
		private void txtProductUnit_TextChanged(object sender, EventArgs e)
		{
			this.setStatusBtnAddToBill();
		}
		private void txtProductPrice_TextChanged(object sender, EventArgs e)
		{
			double num = 0.0;
			if (this.txtProductNumber.Text != "")
			{
				try
				{
					num = double.Parse(this.txtProductNumber.Text);
				}
				catch
				{
					num = 0.0;
				}
				if (this.txtProductPrice.Text != "")
				{
					double num2 = double.Parse(this.txtProductPrice.Text) * num * (this.currVAT / 100.0);
					this.txtVAT.Text = string.Format(Program.lenAffterDecimal, num2);
				}
				this.setStatusBtnAddToBill();
			}
		}
		private void txtProductNumber_TextChanged(object sender, EventArgs e)
		{
			try
			{
				double num = 0.0;
				if (this.txtProductNumber.Text != "")
				{
					try
					{
						num = double.Parse(this.txtProductNumber.Text);
					}
					catch
					{
						num = 0.0;
					}
					if (this.txtProductPrice.Text != "")
					{
						this.txtProductMoney.Text = string.Format(Program.lenAffterDecimal, num * double.Parse(this.txtProductPrice.Text));
					}
					double num2 = double.Parse(this.txtProductPrice.Text) * num * (this.currVAT / 100.0);
					this.txtVAT.Text = string.Format(Program.lenAffterDecimal, num2);
				}
				this.setStatusBtnAddToBill();
			}
			catch
			{
			}
		}
		private void txtProductMoney_TextChanged(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
			this.setStatusBtnAddToBill();
		}
		private void dgvBill_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				if (this.isPostBack)
				{
					this.currBillIndex = e.RowIndex;
					this.txtID.Text = this.objTableBill.Rows[e.RowIndex]["ID"].ToString();
					this.txtDate.Value = DateTime.Parse(this.objTableBill.Rows[e.RowIndex]["CreateDate"].ToString());
					this.txtMoney.Text = string.Format(Program.lenAffterDecimal, double.Parse(this.objTableBill.Rows[e.RowIndex]["TotalMoney"].ToString()));
					this.txtNote.Text = this.objTableBill.Rows[e.RowIndex]["Note"].ToString();
					this.txtDoctorDesease.Text = this.objTableBill.Rows[e.RowIndex]["_DoctorDesease"].ToString();
					this.txtName.Text = this.objTableBill.Rows[e.RowIndex]["_Name"].ToString();
					this.txtAge.Text = this.objTableBill.Rows[e.RowIndex]["_Age"].ToString();
					this.cbbSex.SelectedValue = this.objTableBill.Rows[e.RowIndex]["_Sex"].ToString();
					this.txtAddress.Text = this.objTableBill.Rows[e.RowIndex]["_Address"].ToString();
					this.txtPhone.Text = this.objTableBill.Rows[e.RowIndex]["_Phone"].ToString();
					this.currCustomer = this.objTableBill.Rows[e.RowIndex]["_CusFreeID"].ToString();
					this.cbbWareHouse.SelectedValue = this.objTableBill.Rows[e.RowIndex]["WID"].ToString();
					this.dgvProduct.AutoGenerateColumns = false;
					this.objTable = new DataTable();
					this.objTable = this.objBill.getDetailBill(this.txtID.Text);
					this.dgvProduct.DataSource = this.objTable;
					this.txtDiscountOut.Text = this.objTableBill.Rows[e.RowIndex]["Discount"].ToString();
					try
					{
						double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
						this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
					}
					catch
					{
						this.txtMoneyAfterDiscount.Text = "0";
					}
					try
					{
						double num2 = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
						this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num2);
					}
					catch
					{
						this.txtTotalMoney.Text = "0";
					}
					this.txtID.ReadOnly = true;
					this.btnEdit.Enabled = true;
					this.btnSelect.Enabled = false;
					this.btnAddToBill.Enabled = false;
					this.txtProductNumber.ReadOnly = true;
					this.cbbPacket.Enabled = false;
					this.btnSave.Enabled = false;
					this.btnPrint.Enabled = true;
					this.btnDel.Enabled = false;
					this.txtName.ReadOnly = true;
					this.btnFind.Enabled = false;
					this.txtAge.ReadOnly = true;
					this.txtAddress.ReadOnly = true;
					this.txtDoctorDesease.ReadOnly = true;
					this.txtPhone.ReadOnly = true;
					this.txtNote.ReadOnly = true;
					this.cbbSex.Enabled = false;
					this.txtBarcode.ReadOnly = true;
					this.txtProductPrice.ReadOnly = true;
					this.txtDiscountOut.ReadOnly = true;
					this.txtDiscountOut.ReadOnly = false;
					this.resetControl();
					if (this.allowEditPrice && this.objAccount.checkPerExtention(this.userName, "EditPrice"))
					{
						this.txtProductPrice.ReadOnly = false;
					}
					else
					{
						this.txtProductPrice.ReadOnly = true;
					}
					this.txtTotalVAT.Text = string.Format(Program.lenAffterDecimal, this.caculaterTotalVAT());
				}
			}
			catch
			{
			}
		}
		private void dgvProduct_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				if (e.RowIndex != -1 && this.btnSave.Enabled)
				{
					this.currIndex = e.RowIndex;
					this.currPid = this.objTable.Rows[e.RowIndex]["Pid"].ToString();
					this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
					this.currRate = (double)float.Parse(this.objTable.Rows[e.RowIndex]["Rate"].ToString());
					this.txtProductName.Text = this.objTable.Rows[e.RowIndex]["ProductName"].ToString();
					this.txtProductUnit.Text = this.objTable.Rows[e.RowIndex]["ProductUnit"].ToString();
					this.txtProductPrice.Text = this.objTable.Rows[e.RowIndex]["ProductPrice2"].ToString();
					this.txtProductNumber.Text = this.objTable.Rows[e.RowIndex]["ProductNumber"].ToString();
					this.txtProductMoney.Text = this.objTable.Rows[e.RowIndex]["ProductMoney"].ToString();
					this.cbbPacket.SelectedValue = this.objTable.Rows[e.RowIndex]["Packet"].ToString();
					this.dtpProductDate.Value = DateTime.Parse(this.dgvProduct.Rows[e.RowIndex].Cells["Column7"].Value.ToString());
					this.dptProductExpiryDate.Value = DateTime.Parse(this.dgvProduct.Rows[e.RowIndex].Cells["Column8"].Value.ToString());
					this.cbbNational.SelectedValue = this.objTable.Rows[e.RowIndex]["NationalID"].ToString();
					this.lblPossName.Text = this.objTable.Rows[e.RowIndex]["possName"].ToString();
					this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
					this.btnAddToBill.Enabled = true;
					if (this.BasePrice)
					{
						this.currPrice = this.objProduct.getPriceOutRetailBase(this.currPid, this.cbbPacket.SelectedValue.ToString());
					}
					else
					{
						this.currPrice = double.Parse(this.objProduct.getPriceOutRetailAVG(this.currPid).ToString());
					}
				}
			}
			catch
			{
			}
		}
		private void dgvProduct_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyCode == Keys.Delete && this.btnSave.Enabled)
			{
				this.objTable.Rows[this.currIndex].Delete();
				this.dgvProduct.Refresh();
				this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
			}
		}
		private void cmsDelProduct_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.btnSave.Enabled)
				{
					this.objTable.Rows[this.currIndex].Delete();
					this.dgvProduct.Refresh();
					this.txtMoney.Text = string.Format(Program.lenAffterDecimal, this.checkMoneyOfBill());
				}
			}
			catch
			{
			}
		}
		private void cbbPacket_SelectedIndexChanged(object sender, EventArgs e)
		{
			try
			{
				if (this.BasePrice)
				{
					this.txtProductPrice.Text = this.objProduct.getPriceOutRetailBase(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
				}
				else
				{
					this.txtProductPrice.Text = this.objProduct.getPriceOutRetailAVG(this.currPid).ToString();
				}
				if (this.cbbPacket.SelectedValue.ToString().Trim() != "")
				{
					this.currVAT = this.objProduct.getVATofProduct(this.currPid, this.cbbPacket.SelectedValue.ToString());
				}
				this.txtBalancer.Text = this.objProduct.balancerOfPack(this.currPid, this.cbbPacket.SelectedValue.ToString(), this.cbbWareHouse.SelectedValue.ToString()).ToString();
				this.cbbNational.SelectedValue = this.objProduct.getNationalID(this.currPid, this.cbbPacket.SelectedValue.ToString()).ToString();
			}
			catch
			{
			}
		}
		private void dtpSelectMonth_ValueChanged(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void btnSearch_Click(object sender, EventArgs e)
		{
			frmSearchBillOutputRetail frmSearchBillOutputRetail = new frmSearchBillOutputRetail();
			frmSearchBillOutputRetail.ShowDialog();
			if (frmSearchBillOutputRetail.sql_Search.Trim() != "")
			{
				this.getBill(frmSearchBillOutputRetail.sql_Search);
			}
		}
		private void btnViewAll_Click(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void txtProductNumber_Leave(object sender, EventArgs e)
		{
			this.txtProductNumber.BackColor = Color.White;
			this.objFunc.txtObject_Number_Leave(sender);
		}
		private void txtProductMoney_Leave(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtBalancer_Leave(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtTotalMoney_Leave(object sender, EventArgs e)
		{
			this.txtTotalMoney.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtTotalMoney_TextChanged(object sender, EventArgs e)
		{
			this.objFunc.txtObject_Leave(sender);
		}
		private void btnFind_Click(object sender, EventArgs e)
		{
			frmFindCustomerFree frmFindCustomerFree = new frmFindCustomerFree();
			frmFindCustomerFree.Location = new System.Drawing.Point(this.txtName.Location.X + 327, this.txtName.Location.Y + 110);
			frmFindCustomerFree.ShowDialog();
			if (frmFindCustomerFree._Name.Trim() != "")
			{
				this.currCustomer = frmFindCustomerFree._ID;
				this.txtName.Text = frmFindCustomerFree._Name;
				this.txtAddress.Text = frmFindCustomerFree._Address;
				this.txtPhone.Text = frmFindCustomerFree._Phone;
				this.txtAge.Text = frmFindCustomerFree._Age;
				if (frmFindCustomerFree._Gender.Trim().ToUpper() == "NAM")
				{
					this.cbbSex.SelectedIndex = 0;
				}
				else
				{
					this.cbbSex.SelectedIndex = 1;
				}
			}
		}
		private void btnListUnit_Click(object sender, EventArgs e)
		{
			if (this.currPid != "")
			{
				frmSelectProductUnit frmSelectProductUnit = new frmSelectProductUnit();
				frmSelectProductUnit.Pid = int.Parse(this.currPid);
				frmSelectProductUnit.Location = new System.Drawing.Point(this.txtProductUnit.Location.X + 94, this.txtProductUnit.Location.Y + 107);
				frmSelectProductUnit.ShowDialog();
				this.txtProductUnit.Text = frmSelectProductUnit.unitName;
				this.currRate = (double)float.Parse(frmSelectProductUnit.unitNumber);
				this.txtProductPrice.Text = (this.currPrice / (double)float.Parse(frmSelectProductUnit.unitNumber)).ToString();
			}
		}
		private void txtBarcode_KeyDown(object sender, KeyEventArgs e)
		{
			if (!(this.txtBarcode.Text.Trim() == ""))
			{
				if (e.KeyCode == Keys.Return)
				{
					this.resetControl();
					this.txtProductName.Focus();
					if (this.objProduct.getInformationFromBarcodeRetail(this.txtBarcode, ref this.currPid, this.txtProductName, this.txtProductUnit, this.txtProductPrice, this.cbbNational, this.txtProductNumber, this.txtBalancer, this.cbbWareHouse.SelectedValue.ToString(), this.BasePrice))
					{
						if (this.txtProductName.Text.Trim() != "" && this.cbbPacket.Items.Count == 0)
						{
							this.objFunc.loadPacketIntoComboBox("SELECT DISTINCT [Packet], [ProductExpiryDate] FROM [TabDetailBill] WHERE [Pid] = " + this.currPid + " AND dbo.uf_getBalancerProductByPacket(Pid,Packet) > 0 ORDER BY [ProductExpiryDate]", this.cbbPacket, "Packet", "Packet");
						}
						if (!this.AllowSellSuppen)
						{
							if (this.objProduct.checkForSuppend(this.currPid, this.cbbPacket.SelectedValue.ToString()))
							{
								MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + this.txtProductName + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể xuất kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								return;
							}
						}
						this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
						try
						{
							this.currPrice = (double)float.Parse(this.txtProductPrice.Text);
						}
						catch
						{
							this.currPrice = 0.0;
						}
						this.btnAddToBill.PerformClick();
					}
					else
					{
						MessageBox.Show("Không tìm thấy sản phẩm có mã vạch yêu cầu !", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
					}
				}
			}
		}
		private void cmsAddBill_Click(object sender, EventArgs e)
		{
			this.btnAdd.PerformClick();
		}
		private void cmsEditBill_Click(object sender, EventArgs e)
		{
			this.btnEdit.PerformClick();
		}
		private void cmsSaveBill_Click(object sender, EventArgs e)
		{
			this.btnSave.PerformClick();
		}
		private void cmsPrintBill_Click(object sender, EventArgs e)
		{
			this.btnPrint.PerformClick();
		}
		private void cmsDellBill_Click(object sender, EventArgs e)
		{
			this.btnDel.PerformClick();
		}
		private void cmsSearchBill_Click(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void btnSave_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsSaveBill.Enabled = this.btnSave.Enabled;
			this.btnPrint.Enabled = !this.btnSave.Enabled;
		}
		private void btnDel_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsDellBill.Enabled = this.btnDel.Enabled;
		}
		private void btnPrint_EnabledChanged(object sender, EventArgs e)
		{
			this.cmsPrintBill.Enabled = this.btnPrint.Enabled;
		}
		private void txtProductPrice_Leave(object sender, EventArgs e)
		{
			this.txtProductPrice.BackColor = Color.White;
			this.objFunc.txtObject_Leave(sender);
		}
		private void txtProductName_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r' && this.txtProductName.Text.Trim() != "")
			{
				if (this.txtProductName.Text != "" && this.currPid != "0" && this.currPid.Trim() != "")
				{
					this.cbbPacket.Focus();
				}
				else
				{
					this.btnSelect.PerformClick();
				}
			}
		}
		private void txtProductUnit_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductNumber.Focus();
			}
		}
		private void cbbPacket_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductUnit.Focus();
			}
		}
		private void txtProductPrice_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.btnAddToBill.PerformClick();
			}
		}
		private void txtProductNumber_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtProductPrice.Focus();
			}
		}
		private void txtID_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtName.Focus();
			}
		}
		private void txtName_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtAge.Focus();
			}
		}
		private void txtAge_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.cbbSex.Focus();
			}
		}
		private void cbbSex_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtAddress.Focus();
			}
		}
		private void txtDate_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtAddress.Focus();
			}
		}
		private void txtAddress_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtPhone.Focus();
			}
		}
		private void txtPhone_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				if (this.setFocusCustomer)
				{
					this.txtProductName.Focus();
				}
				else
				{
					this.txtDoctorDesease.Focus();
				}
			}
		}
		private void txtTotalMoney_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtDoctorDesease.Focus();
			}
		}
		private void txtNote_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtDiscountOut.Focus();
			}
		}
		private void txtDoctorDesease_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.txtNote.Focus();
			}
		}
		private void txtProductName_KeyDown(object sender, KeyEventArgs e)
		{
			if (!(this.txtProductName.Text.Trim() == ""))
			{
				if (e.KeyCode == Keys.Return)
				{
					this.txtProductName.Focus();
					if (this.objProduct.getInformationFromBarcodeRetail(this.txtProductName, ref this.currPid, this.txtProductName, this.txtProductUnit, this.txtProductPrice, this.cbbNational, this.txtProductNumber, this.txtBalancer, this.cbbWareHouse.SelectedValue.ToString(), this.BasePrice))
					{
						if (this.txtProductName.Text.Trim() != "" && this.cbbPacket.Items.Count == 0)
						{
							this.objFunc.loadPacketIntoComboBox("SELECT DISTINCT [Packet], [ProductExpiryDate] FROM [TabDetailBill] WHERE [Pid] = " + this.currPid + " AND dbo.uf_getBalancerProductByPacket(Pid,Packet) > 0 ORDER BY [ProductExpiryDate]", this.cbbPacket, "Packet", "Packet");
						}
						if (!this.AllowSellSuppen)
						{
							if (this.objProduct.checkForSuppend(this.currPid, this.cbbPacket.SelectedValue.ToString()))
							{
								MessageBox.Show("Bạn đang chọn mặt thuốc\r\n\r\n" + this.txtProductName + "\r\n\r\nThuộc danh mục thuốc cấm lưu hành nên không thể xuất kho", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
								return;
							}
						}
						this.txtBalancerAllPacket.Text = this.objProduct.balancerOfAllPack(this.currPid, this.cbbWareHouse.SelectedValue.ToString()).ToString();
						try
						{
							this.currPrice = (double)float.Parse(this.txtProductPrice.Text);
						}
						catch
						{
							this.currPrice = 0.0;
						}
						this.btnAddToBill.PerformClick();
					}
					else
					{
						if (e.KeyData == Keys.Down)
						{
							if (this.txtProductName.Text.Trim() != "")
							{
								this.btnSelect.PerformClick();
							}
						}
						else
						{
							if (e.KeyData == Keys.Return)
							{
								if (this.txtProductName.Text.Trim() == "")
								{
									this.btnSelect.PerformClick();
								}
								else
								{
									this.cbbPacket.Focus();
								}
							}
						}
					}
				}
			}
		}
		private void frmOutputRetail_FormClosing(object sender, FormClosingEventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				if (MessageBox.Show("Bạn có muốn ghi lại thông tin về hoá đơn hiện tại không?", "Thông báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
				{
					e.Cancel = true;
					this.btnSave.PerformClick();
				}
			}
		}
		private void txtID_Enter(object sender, EventArgs e)
		{
			this.txtID.BackColor = Color.Aqua;
		}
		private void txtID_Leave(object sender, EventArgs e)
		{
			this.txtID.BackColor = Color.White;
		}
		private void txtName_Enter(object sender, EventArgs e)
		{
			this.txtName.BackColor = Color.Aqua;
		}
		private void txtName_Leave(object sender, EventArgs e)
		{
			this.txtName.BackColor = Color.White;
		}
		private void txtAge_Enter(object sender, EventArgs e)
		{
			this.txtAge.BackColor = Color.Aqua;
		}
		private void txtAge_Leave(object sender, EventArgs e)
		{
			this.txtAge.BackColor = Color.White;
		}
		private void txtAddress_Enter(object sender, EventArgs e)
		{
			this.txtAddress.BackColor = Color.Aqua;
		}
		private void txtAddress_Leave(object sender, EventArgs e)
		{
			this.txtAddress.BackColor = Color.White;
		}
		private void txtPhone_Enter(object sender, EventArgs e)
		{
			this.txtPhone.BackColor = Color.Aqua;
		}
		private void txtPhone_Leave(object sender, EventArgs e)
		{
			this.txtPhone.BackColor = Color.White;
		}
		private void txtTotalMoney_Enter(object sender, EventArgs e)
		{
			this.txtTotalMoney.BackColor = Color.Aqua;
		}
		private void txtDoctorDesease_Enter(object sender, EventArgs e)
		{
			this.txtDoctorDesease.BackColor = Color.Aqua;
		}
		private void txtDoctorDesease_Leave(object sender, EventArgs e)
		{
			this.txtDoctorDesease.BackColor = Color.White;
		}
		private void txtNote_Enter(object sender, EventArgs e)
		{
			this.txtNote.BackColor = Color.Aqua;
		}
		private void txtNote_Leave(object sender, EventArgs e)
		{
			this.txtNote.BackColor = Color.White;
		}
		private void txtProductName_Enter(object sender, EventArgs e)
		{
			this.txtProductName.BackColor = Color.Aqua;
		}
		private void txtProductName_Leave(object sender, EventArgs e)
		{
			this.txtProductName.BackColor = Color.White;
		}
		private void txtProductUnit_Enter(object sender, EventArgs e)
		{
			this.txtProductUnit.BackColor = Color.Aqua;
		}
		private void txtProductUnit_Leave(object sender, EventArgs e)
		{
			this.txtProductUnit.BackColor = Color.White;
		}
		private void txtProductPrice_Enter(object sender, EventArgs e)
		{
			this.txtProductPrice.BackColor = Color.Aqua;
		}
		private void txtProductNumber_Enter(object sender, EventArgs e)
		{
			this.txtProductNumber.BackColor = Color.Aqua;
		}
		private void frmOutputRetail_Shown(object sender, EventArgs e)
		{
			this.isPostBack = true;
			this.btnAdd.PerformClick();
		}
		private void btnSearchTime_Click(object sender, EventArgs e)
		{
			this.getBill("");
		}
		private void txtMoney_TextChanged(object sender, EventArgs e)
		{
			try
			{
				double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtMoneyAfterDiscount.Text = "0";
			}
			try
			{
				double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtTotalMoney.Text = "0";
			}
		}
		private void txtDiscountOut_TextChanged(object sender, EventArgs e)
		{
			try
			{
				double num = double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtMoneyAfterDiscount.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtMoneyAfterDiscount.Text = "0";
			}
			try
			{
				double num = double.Parse(this.txtMoney.Text) - double.Parse(this.txtMoney.Text) * double.Parse(this.txtDiscountOut.Text) / 100.0;
				this.txtTotalMoney.Text = string.Format(Program.lenAffterDecimal, num);
			}
			catch
			{
				this.txtTotalMoney.Text = "0";
			}
		}
		private void txtDiscountOut_KeyPress(object sender, KeyPressEventArgs e)
		{
			if (e.KeyChar == '\r')
			{
				this.btnSave.PerformClick();
			}
		}
		private void txtMoneyAfterDiscount_Leave(object sender, EventArgs e)
		{
			this.txtMoneyAfterDiscount.BackColor = Color.White;
			try
			{
				double num = double.Parse(this.txtMoneyAfterDiscount.Text) * 100.0 / double.Parse(this.txtMoney.Text);
				this.txtDiscountOut.Text = num.ToString();
			}
			catch
			{
				this.txtDiscountOut.Text = "0";
			}
		}
		private void ctmJustBillAdd_Click(object sender, EventArgs e)
		{
			this.btnAdd.PerformClick();
		}
		private void ctmJustBillEdit_Click(object sender, EventArgs e)
		{
			this.btnEdit.PerformClick();
		}
		private void ctmJustBillPrint_Click(object sender, EventArgs e)
		{
			this.btnPrint.PerformClick();
		}
		private void ctmJustBillDel_Click(object sender, EventArgs e)
		{
			this.btnDel.PerformClick();
		}
		private void ctmJustBillSearch_Click(object sender, EventArgs e)
		{
			this.btnSearch.PerformClick();
		}
		private void label28_DoubleClick(object sender, EventArgs e)
		{
			if (this.dgvBill.RowCount > 0)
			{
				frmSlideShow frmSlideShow = new frmSlideShow();
				frmSlideShow.ShowDialog();
				if (frmSlideShow.OKSelect && frmSlideShow.nmUSecond.Value > 0m)
				{
					this.updateDataWithSlideShow = frmSlideShow.ckbSaveData.Checked;
					if (frmSlideShow.rdbUp.Checked)
					{
						this.Direction = 1;
						this.slideShowIndex = -1;
					}
					else
					{
						this.Direction = -1;
						this.slideShowIndex = this.dgvBill.RowCount;
					}
					this.timer1.Interval = (int)frmSlideShow.nmUSecond.Value * 1000;
					this.timer1.Enabled = true;
					this.timer1.Start();
					this.btnStopSlide.Visible = true;
				}
			}
		}
		private void btnStopSlide_Click(object sender, EventArgs e)
		{
			this.timer1.Stop();
			this.btnStopSlide.Visible = false;
		}
		public void SetFocusDatagridview(DataGridView dgv, int CellPosition)
		{
			try
			{
				dgv.FirstDisplayedScrollingRowIndex = CellPosition;
				dgv.Rows[CellPosition].Selected = true;
				dgv.CurrentCell = dgv.Rows[CellPosition].Cells[0];
				dgv.BeginEdit(false);
			}
			catch
			{
				this.timer2.Stop();
				this.timer1.Stop();
				this.btnStopSlide.Visible = false;
				this.btnEdit.Enabled = true;
				this.btnSave.Enabled = false;
			}
		}
		private void timer1_Tick(object sender, EventArgs e)
		{
			if (this.Direction > 0 && this.slideShowIndex < this.dgvBill.RowCount - 1)
			{
				this.slideShowIndex += this.Direction;
			}
			else
			{
				if (this.Direction >= 0 || this.slideShowIndex <= 0)
				{
					this.timer2.Stop();
					this.timer1.Stop();
					this.btnStopSlide.Visible = false;
					this.btnEdit.Enabled = true;
					this.btnSave.Enabled = false;
					return;
				}
				this.slideShowIndex += this.Direction;
			}
			this.btnStopSlide.Text = (this.slideShowIndex + 1).ToString() + " / " + this.dgvBill.RowCount.ToString() + "  Dừng xem";
			this.SetFocusDatagridview(this.dgvBill, this.slideShowIndex);
			if (this.updateDataWithSlideShow)
			{
				this.saveIntervalCondition = 0;
				this.saveInterval = this.timer1.Interval / 1000 - 1;
				this.btnEdit.PerformClick();
				this.timer2.Enabled = true;
				this.timer2.Start();
			}
		}
		private void timer2_Tick(object sender, EventArgs e)
		{
			this.saveIntervalCondition++;
			if (this.saveIntervalCondition == this.saveInterval)
			{
				this.btnSave.PerformClick();
			}
		}
		private void mnuPrintUsage_Click(object sender, EventArgs e)
		{
			if (this.txtID.Text != "" && this.dgvProduct.Rows.Count > 0)
			{
				new frmPrintUsage
				{
					lblBillID = 
					{
						Text = this.txtID.Text
					}
				}.ShowDialog();
			}
		}
		private double caculaterTotalVAT()
		{
			double num = 0.0;
			for (int i = 0; i < this.objTable.Rows.Count; i++)
			{
				num += double.Parse(this.objTable.Rows[i]["VATasMoney"].ToString().Replace(",", ""));
			}
			return num;
		}
		private void txtName_DoubleClick(object sender, EventArgs e)
		{
			if (this.btnSave.Enabled)
			{
				this.btnFind.PerformClick();
			}
		}
		private void txtProductUnit_DoubleClick(object sender, EventArgs e)
		{
			if (this.btnSave.Enabled && this.txtProductUnit.Text.Trim() != "")
			{
				this.btnListUnit.PerformClick();
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			this.components = new Container();
			ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(frmOutputRetail));
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle9 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle10 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle11 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle12 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle13 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle14 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle15 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle16 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle17 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle18 = new DataGridViewCellStyle();
			this.groupBox3 = new GroupBox();
			this.label17 = new Label();
			this.btnSearchTime = new Button();
			this.dtpTo = new DateTimePicker();
			this.dtpFrom = new DateTimePicker();
			this.dgvBill = new DataGridView();
			this.dataGridViewTextBoxColumn1 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn7 = new DataGridViewTextBoxColumn();
			this.Column10 = new DataGridViewTextBoxColumn();
			this.Column11 = new DataGridViewTextBoxColumn();
			this.Column12 = new DataGridViewTextBoxColumn();
			this.Column13 = new DataGridViewTextBoxColumn();
			this.Column14 = new DataGridViewTextBoxColumn();
			this.Column15 = new DataGridViewTextBoxColumn();
			this.Column16 = new DataGridViewTextBoxColumn();
			this.Column17 = new DataGridViewTextBoxColumn();
			this.Column18 = new DataGridViewTextBoxColumn();
			this.Column19 = new DataGridViewTextBoxColumn();
			this.Column24 = new DataGridViewTextBoxColumn();
			this.Column25 = new DataGridViewTextBoxColumn();
			this.Column26 = new DataGridViewTextBoxColumn();
			this._DoctorDesease = new DataGridViewTextBoxColumn();
			this._CusFreeID = new DataGridViewTextBoxColumn();
			this.ctmJustBill = new ContextMenuStrip(this.components);
			this.ctmJustBillAdd = new ToolStripMenuItem();
			this.ctmJustBillEdit = new ToolStripMenuItem();
			this.ctmJustBillPrint = new ToolStripMenuItem();
			this.mnuPrintUsage = new ToolStripMenuItem();
			this.toolStripSeparator5 = new ToolStripSeparator();
			this.ctmJustBillDel = new ToolStripMenuItem();
			this.toolStripSeparator6 = new ToolStripSeparator();
			this.ctmJustBillSearch = new ToolStripMenuItem();
			this.btnClose = new Button();
			this.btnDel = new Button();
			this.btnPrint = new Button();
			this.btnSave = new Button();
			this.btnEdit = new Button();
			this.btnAdd = new Button();
			this.dgvProduct = new DataGridView();
			this.Column2 = new DataGridViewTextBoxColumn();
			this.Column1 = new DataGridViewTextBoxColumn();
			this.Column3 = new DataGridViewTextBoxColumn();
			this.Column4 = new DataGridViewTextBoxColumn();
			this.Column5 = new DataGridViewTextBoxColumn();
			this.VATasMoney = new DataGridViewTextBoxColumn();
			this.Column6 = new DataGridViewTextBoxColumn();
			this.Column7 = new DataGridViewTextBoxColumn();
			this.Column8 = new DataGridViewTextBoxColumn();
			this.Column9 = new DataGridViewTextBoxColumn();
			this.Column20 = new DataGridViewTextBoxColumn();
			this.Column21 = new DataGridViewTextBoxColumn();
			this.Column22 = new DataGridViewTextBoxColumn();
			this.Column23 = new DataGridViewTextBoxColumn();
			this.possName = new DataGridViewTextBoxColumn();
			this.Rate = new DataGridViewTextBoxColumn();
			this.IdRegisters = new DataGridViewTextBoxColumn();
			this.IdControl = new DataGridViewTextBoxColumn();
			this.IdBisMake = new DataGridViewTextBoxColumn();
			this.IdBisImport = new DataGridViewTextBoxColumn();
			this.BarCode = new DataGridViewTextBoxColumn();
			this.cmsBill = new ContextMenuStrip(this.components);
			this.cmsAddProduct = new ToolStripMenuItem();
			this.toolStripSeparator4 = new ToolStripSeparator();
			this.cmsDelProduct = new ToolStripMenuItem();
			this.toolStripSeparator1 = new ToolStripSeparator();
			this.cmsAddBill = new ToolStripMenuItem();
			this.cmsEditBill = new ToolStripMenuItem();
			this.toolStripSeparator2 = new ToolStripSeparator();
			this.cmsSaveBill = new ToolStripMenuItem();
			this.cmsPrintBill = new ToolStripMenuItem();
			this.cmsDellBill = new ToolStripMenuItem();
			this.toolStripSeparator3 = new ToolStripSeparator();
			this.cmsSearchBill = new ToolStripMenuItem();
			this.groupBox1 = new GroupBox();
			this.label18 = new Label();
			this.txtPhone = new TextBox();
			this.label8 = new Label();
			this.txtAddress = new TextBox();
			this.label6 = new Label();
			this.txtAge = new TextBox();
			this.label5 = new Label();
			this.cbbSex = new ComboBox();
			this.txtName = new TextBox();
			this.label3 = new Label();
			this.label2 = new Label();
			this.txtDate = new DateTimePicker();
			this.txtID = new TextBox();
			this.label1 = new Label();
			this.btnFind = new Button();
			this.txtDoctorDesease = new TextBox();
			this.label4 = new Label();
			this.txtNote = new TextBox();
			this.label9 = new Label();
			this.txtTotalMoney = new TextBox();
			this.label7 = new Label();
			this.btnListUnit = new Button();
			this.btnSelect = new Button();
			this.txtBarcode = new TextBox();
			this.lblPossName = new Label();
			this.cbbPacket = new ComboBox();
			this.label22 = new Label();
			this.txtProductNumber = new TextBox();
			this.txtProductPrice = new TextBox();
			this.txtProductUnit = new TextBox();
			this.txtProductName = new TextBox();
			this.txtBalancer = new TextBox();
			this.label21 = new Label();
			this.cbbNational = new ComboBox();
			this.label20 = new Label();
			this.txtProductMoney = new TextBox();
			this.label12 = new Label();
			this.dptProductExpiryDate = new DateTimePicker();
			this.label16 = new Label();
			this.dtpProductDate = new DateTimePicker();
			this.label15 = new Label();
			this.btnAddToBill = new Button();
			this.btnSearch = new Button();
			this.txtBalancerAllPacket = new TextBox();
			this.cbbWareHouse = new ComboBox();
			this.label26 = new Label();
			this.groupBox4 = new GroupBox();
			this.label24 = new Label();
			this.lblProduct = new Button();
			this.lblPrice = new Button();
			this.lblMoney = new Button();
			this.lblNumber = new Button();
			this.lblUnit = new Button();
			this.lblPacket = new Button();
			this.label19 = new Label();
			this.label27 = new Label();
			this.txtMoney = new TextBox();
			this.label10 = new Label();
			this.txtMoneyAfterDiscount = new TextBox();
			this.txtDiscountOut = new TextBox();
			this.label11 = new Label();
			this.toolTip1 = new ToolTip(this.components);
			this.btnStopSlide = new Button();
			this.timer2 = new System.Windows.Forms.Timer(this.components);
			this.timer1 = new System.Windows.Forms.Timer(this.components);
			this.txtTotalVAT = new TextBox();
			this.label13 = new Label();
			this.button1 = new Button();
			this.txtVAT = new TextBox();
			this.button2 = new Button();
			this.label14 = new Label();
			this.label29 = new Label();
			this.label23 = new Label();
			this.dataGridViewTextBoxColumn2 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn3 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn4 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn5 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn6 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn8 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn9 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn10 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn11 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn12 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn13 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn14 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn15 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn16 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn17 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn18 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn19 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn20 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn21 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn22 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn23 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn24 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn25 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn26 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn27 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn28 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn29 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn30 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn31 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn32 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn33 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn34 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn35 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn36 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn37 = new DataGridViewTextBoxColumn();
			this.dataGridViewTextBoxColumn38 = new DataGridViewTextBoxColumn();
			this.groupBox3.SuspendLayout();
			((ISupportInitialize)this.dgvBill).BeginInit();
			this.ctmJustBill.SuspendLayout();
			((ISupportInitialize)this.dgvProduct).BeginInit();
			this.cmsBill.SuspendLayout();
			this.groupBox1.SuspendLayout();
			this.groupBox4.SuspendLayout();
			base.SuspendLayout();
			this.groupBox3.Controls.Add(this.label17);
			this.groupBox3.Controls.Add(this.btnSearchTime);
			this.groupBox3.Controls.Add(this.dtpTo);
			this.groupBox3.Controls.Add(this.dtpFrom);
			this.groupBox3.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox3.Location = new System.Drawing.Point(7, 125);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new Size(220, 46);
			this.groupBox3.TabIndex = 42;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "Tìm kiếm";
//			this.label17.Image = (Image)componentResourceManager.GetObject("label17.Image");
			this.label17.Location = new System.Drawing.Point(89, 18);
			this.label17.Name = "label17";
			this.label17.Size = new Size(20, 25);
			this.label17.TabIndex = 151;
			this.btnSearchTime.BackColor = SystemColors.ButtonFace;
			this.btnSearchTime.FlatAppearance.BorderColor = Color.FromArgb(0, 192, 192);
			this.btnSearchTime.FlatStyle = FlatStyle.Flat;
			this.btnSearchTime.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			//this.btnSearchTime.Image = (Image)componentResourceManager.GetObject("btnSearchTime.Image");
			this.btnSearchTime.Location = new System.Drawing.Point(196, 19);
			this.btnSearchTime.Name = "btnSearchTime";
			this.btnSearchTime.Size = new Size(21, 21);
			this.btnSearchTime.TabIndex = 150;
			this.btnSearchTime.UseVisualStyleBackColor = false;
			this.btnSearchTime.Click += new EventHandler(this.btnSearchTime_Click);
			this.dtpTo.CustomFormat = "dd/MM/yyyy";
			this.dtpTo.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpTo.Format = DateTimePickerFormat.Custom;
			this.dtpTo.Location = new System.Drawing.Point(109, 19);
			this.dtpTo.Name = "dtpTo";
			this.dtpTo.Size = new Size(86, 21);
			this.dtpTo.TabIndex = 149;
			this.dtpFrom.CustomFormat = "dd/MM/yyyy";
			this.dtpFrom.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.dtpFrom.Format = DateTimePickerFormat.Custom;
			this.dtpFrom.Location = new System.Drawing.Point(3, 19);
			this.dtpFrom.Name = "dtpFrom";
			this.dtpFrom.Size = new Size(86, 21);
			this.dtpFrom.TabIndex = 148;
			this.dgvBill.AllowUserToAddRows = false;
			this.dgvBill.AllowUserToDeleteRows = false;
			this.dgvBill.AllowUserToOrderColumns = true;
			this.dgvBill.AllowUserToResizeColumns = false;
			this.dgvBill.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvBill.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvBill.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left);
			this.dgvBill.BackgroundColor = Color.White;
			this.dgvBill.BorderStyle = BorderStyle.Fixed3D;
			this.dgvBill.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.dgvBill.ColumnHeadersVisible = false;
			this.dgvBill.Columns.AddRange(new DataGridViewColumn[]
			{
				this.dataGridViewTextBoxColumn1,
				this.dataGridViewTextBoxColumn7,
				this.Column10,
				this.Column11,
				this.Column12,
				this.Column13,
				this.Column14,
				this.Column15,
				this.Column16,
				this.Column17,
				this.Column18,
				this.Column19,
				this.Column24,
				this.Column25,
				this.Column26,
				this._DoctorDesease,
				this._CusFreeID
			});
			this.dgvBill.ContextMenuStrip = this.ctmJustBill;
			this.dgvBill.Cursor = Cursors.Hand;
			this.dgvBill.EnableHeadersVisualStyles = false;
			this.dgvBill.Location = new System.Drawing.Point(7, 244);
			this.dgvBill.MultiSelect = false;
			this.dgvBill.Name = "dgvBill";
			this.dgvBill.ReadOnly = true;
			this.dgvBill.RowHeadersVisible = false;
			this.dgvBill.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvBill.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvBill.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvBill.Size = new Size(220, 312);
			this.dgvBill.TabIndex = 41;
			this.dgvBill.CellEnter += new DataGridViewCellEventHandler(this.dgvBill_CellEnter);
			this.dataGridViewTextBoxColumn1.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.dataGridViewTextBoxColumn1.DataPropertyName = "ID";
			this.dataGridViewTextBoxColumn1.HeaderText = "Hoá đơn";
			this.dataGridViewTextBoxColumn1.MinimumWidth = 120;
			this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
			this.dataGridViewTextBoxColumn1.ReadOnly = true;
			this.dataGridViewTextBoxColumn7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn7.DataPropertyName = "CreateDate";
			dataGridViewCellStyle2.Format = "D";
			dataGridViewCellStyle2.NullValue = null;
			this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle2;
			this.dataGridViewTextBoxColumn7.HeaderText = "Ngày lập";
			this.dataGridViewTextBoxColumn7.MinimumWidth = 88;
			this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
			this.dataGridViewTextBoxColumn7.ReadOnly = true;
			this.dataGridViewTextBoxColumn7.Visible = false;
			this.dataGridViewTextBoxColumn7.Width = 88;
			this.Column10.DataPropertyName = "TotalMoney";
			this.Column10.HeaderText = "TotalMoney";
			this.Column10.Name = "Column10";
			this.Column10.ReadOnly = true;
			this.Column10.Visible = false;
			this.Column11.DataPropertyName = "TypeInput";
			this.Column11.HeaderText = "TypeInput";
			this.Column11.Name = "Column11";
			this.Column11.ReadOnly = true;
			this.Column11.Visible = false;
			this.Column12.DataPropertyName = "WID";
			this.Column12.HeaderText = "WID";
			this.Column12.Name = "Column12";
			this.Column12.ReadOnly = true;
			this.Column12.Visible = false;
			this.Column13.DataPropertyName = "Note";
			this.Column13.HeaderText = "Note";
			this.Column13.Name = "Column13";
			this.Column13.ReadOnly = true;
			this.Column13.Visible = false;
			this.Column14.DataPropertyName = "PID";
			this.Column14.HeaderText = "PID";
			this.Column14.Name = "Column14";
			this.Column14.ReadOnly = true;
			this.Column14.Visible = false;
			this.Column15.HeaderText = "Tên khách hàng";
			this.Column15.Name = "Column15";
			this.Column15.ReadOnly = true;
			this.Column15.Visible = false;
			this.Column16.HeaderText = "Tuổi";
			this.Column16.Name = "Column16";
			this.Column16.ReadOnly = true;
			this.Column16.Visible = false;
			this.Column17.HeaderText = "Giới tính";
			this.Column17.Name = "Column17";
			this.Column17.ReadOnly = true;
			this.Column17.Visible = false;
			this.Column18.HeaderText = "Địa chỉ";
			this.Column18.Name = "Column18";
			this.Column18.ReadOnly = true;
			this.Column18.Visible = false;
			this.Column19.HeaderText = "Điện thoại";
			this.Column19.Name = "Column19";
			this.Column19.ReadOnly = true;
			this.Column19.Visible = false;
			this.Column24.DataPropertyName = "UserName";
			this.Column24.HeaderText = "Tài khoản";
			this.Column24.Name = "Column24";
			this.Column24.ReadOnly = true;
			this.Column24.Visible = false;
			this.Column25.DataPropertyName = "FullName";
			this.Column25.HeaderText = "Tên tài khoản";
			this.Column25.Name = "Column25";
			this.Column25.ReadOnly = true;
			this.Column25.Visible = false;
			this.Column26.DataPropertyName = "Printed";
			this.Column26.HeaderText = "Printed";
			this.Column26.Name = "Column26";
			this.Column26.ReadOnly = true;
			this.Column26.Visible = false;
			this._DoctorDesease.DataPropertyName = "_DoctorDesease";
			this._DoctorDesease.HeaderText = "_DoctorDesease";
			this._DoctorDesease.Name = "_DoctorDesease";
			this._DoctorDesease.ReadOnly = true;
			this._DoctorDesease.Visible = false;
			this._CusFreeID.DataPropertyName = "_CusFreeID";
			this._CusFreeID.HeaderText = "_CusFreeID";
			this._CusFreeID.Name = "_CusFreeID";
			this._CusFreeID.ReadOnly = true;
			this._CusFreeID.Visible = false;
			this.ctmJustBill.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.ctmJustBill.Items.AddRange(new ToolStripItem[]
			{
				this.ctmJustBillAdd,
				this.ctmJustBillEdit,
				this.ctmJustBillPrint,
				this.mnuPrintUsage,
				this.toolStripSeparator5,
				this.ctmJustBillDel,
				this.toolStripSeparator6,
				this.ctmJustBillSearch
			});
			this.ctmJustBill.Name = "ctmJustBill";
			this.ctmJustBill.Size = new Size(198, 148);
			this.ctmJustBillAdd.Name = "ctmJustBillAdd";
			this.ctmJustBillAdd.Size = new Size(197, 22);
			this.ctmJustBillAdd.Text = "Thêm hoá đơn";
			this.ctmJustBillAdd.Click += new EventHandler(this.ctmJustBillAdd_Click);
			this.ctmJustBillEdit.Name = "ctmJustBillEdit";
			this.ctmJustBillEdit.Size = new Size(197, 22);
			this.ctmJustBillEdit.Text = "Sửa hoá đơn";
			this.ctmJustBillEdit.Click += new EventHandler(this.ctmJustBillEdit_Click);
			this.ctmJustBillPrint.Name = "ctmJustBillPrint";
			this.ctmJustBillPrint.Size = new Size(197, 22);
			this.ctmJustBillPrint.Text = "Xem và In hoá đơn";
			this.ctmJustBillPrint.Click += new EventHandler(this.ctmJustBillPrint_Click);
			this.mnuPrintUsage.Name = "mnuPrintUsage";
			this.mnuPrintUsage.Size = new Size(197, 22);
			this.mnuPrintUsage.Text = "In hướng dẫn sử dụng";
			this.mnuPrintUsage.Click += new EventHandler(this.mnuPrintUsage_Click);
			this.toolStripSeparator5.Name = "toolStripSeparator5";
			this.toolStripSeparator5.Size = new Size(194, 6);
			this.ctmJustBillDel.Name = "ctmJustBillDel";
			this.ctmJustBillDel.Size = new Size(197, 22);
			this.ctmJustBillDel.Text = "Xoá hoá đơn";
			this.ctmJustBillDel.Click += new EventHandler(this.ctmJustBillDel_Click);
			this.toolStripSeparator6.Name = "toolStripSeparator6";
			this.toolStripSeparator6.Size = new Size(194, 6);
			this.ctmJustBillSearch.Name = "ctmJustBillSearch";
			this.ctmJustBillSearch.Size = new Size(197, 22);
			this.ctmJustBillSearch.Text = "Tìm kiếm hoá đơn";
			this.ctmJustBillSearch.Click += new EventHandler(this.ctmJustBillSearch_Click);
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.BackColor = SystemColors.ButtonFace;
			this.btnClose.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnClose.FlatStyle = FlatStyle.Flat;
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new System.Drawing.Point(832, 564);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(107, 26);
			this.btnClose.TabIndex = 48;
			this.btnClose.Text = "Thoát [ESC]";
			this.btnClose.UseVisualStyleBackColor = false;
			this.btnClose.Click += new EventHandler(this.btnClose_Click);
			this.btnDel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnDel.BackColor = SystemColors.ButtonFace;
			this.btnDel.Enabled = false;
			this.btnDel.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnDel.FlatStyle = FlatStyle.Flat;
			this.btnDel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnDel.Location = new System.Drawing.Point(449, 564);
			this.btnDel.Name = "btnDel";
			this.btnDel.Size = new Size(105, 26);
			this.btnDel.TabIndex = 24;
			this.btnDel.Text = "Xoá HĐ [ F8 ]";
			this.btnDel.UseVisualStyleBackColor = false;
			this.btnDel.Click += new EventHandler(this.btnDel_Click);
			this.btnDel.EnabledChanged += new EventHandler(this.btnDel_EnabledChanged);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.BackColor = SystemColors.ButtonFace;
			this.btnPrint.Enabled = false;
			this.btnPrint.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnPrint.FlatStyle = FlatStyle.Flat;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new System.Drawing.Point(340, 564);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(105, 26);
			this.btnPrint.TabIndex = 23;
			this.btnPrint.Text = "Xem và in [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = false;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnPrint.EnabledChanged += new EventHandler(this.btnPrint_EnabledChanged);
			this.btnSave.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSave.BackColor = SystemColors.ButtonFace;
			this.btnSave.Enabled = false;
			this.btnSave.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnSave.FlatStyle = FlatStyle.Flat;
			this.btnSave.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSave.Location = new System.Drawing.Point(231, 564);
			this.btnSave.Name = "btnSave";
			this.btnSave.Size = new Size(105, 26);
			this.btnSave.TabIndex = 22;
			this.btnSave.Text = "Lưu HĐ [ F6 ]";
			this.btnSave.UseVisualStyleBackColor = false;
			this.btnSave.Click += new EventHandler(this.btnSave_Click);
			this.btnSave.EnabledChanged += new EventHandler(this.btnSave_EnabledChanged);
			this.btnEdit.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnEdit.BackColor = SystemColors.ButtonFace;
			this.btnEdit.Enabled = false;
			this.btnEdit.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnEdit.FlatStyle = FlatStyle.Flat;
			this.btnEdit.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnEdit.Location = new System.Drawing.Point(122, 564);
			this.btnEdit.Name = "btnEdit";
			this.btnEdit.Size = new Size(105, 26);
			this.btnEdit.TabIndex = 26;
			this.btnEdit.Text = "Sửa HĐ [ F5 ]";
			this.btnEdit.UseVisualStyleBackColor = false;
			this.btnEdit.Click += new EventHandler(this.btnEdit_Click);
			this.btnAdd.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAdd.BackColor = SystemColors.ButtonFace;
			this.btnAdd.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnAdd.FlatStyle = FlatStyle.Flat;
			this.btnAdd.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnAdd.Location = new System.Drawing.Point(13, 564);
			this.btnAdd.Name = "btnAdd";
			this.btnAdd.Size = new Size(105, 26);
			this.btnAdd.TabIndex = 1;
			this.btnAdd.Text = "Thêm mới [ F4 ]";
			this.btnAdd.UseVisualStyleBackColor = false;
			this.btnAdd.Click += new EventHandler(this.btnAdd_Click);
			this.dgvProduct.AllowUserToAddRows = false;
			this.dgvProduct.AllowUserToDeleteRows = false;
			this.dgvProduct.AllowUserToOrderColumns = true;
			this.dgvProduct.AllowUserToResizeColumns = false;
			this.dgvProduct.AllowUserToResizeRows = false;
			dataGridViewCellStyle3.BackColor = Color.White;
			dataGridViewCellStyle3.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
			this.dgvProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvProduct.BackgroundColor = Color.White;
			this.dgvProduct.BorderStyle = BorderStyle.Fixed3D;
			this.dgvProduct.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.AutoSize;
			this.dgvProduct.ColumnHeadersVisible = false;
			this.dgvProduct.Columns.AddRange(new DataGridViewColumn[]
			{
				this.Column2,
				this.Column1,
				this.Column3,
				this.Column4,
				this.Column5,
				this.VATasMoney,
				this.Column6,
				this.Column7,
				this.Column8,
				this.Column9,
				this.Column20,
				this.Column21,
				this.Column22,
				this.Column23,
				this.possName,
				this.Rate,
				this.IdRegisters,
				this.IdControl,
				this.IdBisMake,
				this.IdBisImport,
				this.BarCode
			});
			this.dgvProduct.ContextMenuStrip = this.cmsBill;
			this.dgvProduct.Cursor = Cursors.Hand;
			this.dgvProduct.EnableHeadersVisualStyles = false;
			this.dgvProduct.Location = new System.Drawing.Point(233, 148);
			this.dgvProduct.MultiSelect = false;
			this.dgvProduct.Name = "dgvProduct";
			this.dgvProduct.ReadOnly = true;
			this.dgvProduct.RowHeadersVisible = false;
			this.dgvProduct.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			this.dgvProduct.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.dgvProduct.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvProduct.Size = new Size(710, 346);
			this.dgvProduct.TabIndex = 17;
			this.dgvProduct.KeyDown += new KeyEventHandler(this.dgvProduct_KeyDown);
			this.dgvProduct.CellEnter += new DataGridViewCellEventHandler(this.dgvProduct_CellEnter);
			this.Column2.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.Column2.DataPropertyName = "productName";
			this.Column2.HeaderText = "Sản phẩm";
			this.Column2.MinimumWidth = 183;
			this.Column2.Name = "Column2";
			this.Column2.ReadOnly = true;
			this.Column2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column1.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column1.DataPropertyName = "Packet";
			this.Column1.HeaderText = "Số lô";
			this.Column1.MinimumWidth = 95;
			this.Column1.Name = "Column1";
			this.Column1.ReadOnly = true;
			this.Column1.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column1.Width = 95;
			this.Column3.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column3.DataPropertyName = "productUnit";
			this.Column3.HeaderText = "Đơn vị tính";
			this.Column3.MinimumWidth = 86;
			this.Column3.Name = "Column3";
			this.Column3.ReadOnly = true;
			this.Column3.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column3.Width = 86;
			this.Column4.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column4.DataPropertyName = "productNumber";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle4.Format = "N0";
			dataGridViewCellStyle4.NullValue = null;
			this.Column4.DefaultCellStyle = dataGridViewCellStyle4;
			this.Column4.HeaderText = "Số lượng";
			this.Column4.MinimumWidth = 78;
			this.Column4.Name = "Column4";
			this.Column4.ReadOnly = true;
			this.Column4.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column4.Width = 78;
			this.Column5.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column5.DataPropertyName = "productPrice2";
			dataGridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle5.Format = "N0";
			dataGridViewCellStyle5.NullValue = null;
			this.Column5.DefaultCellStyle = dataGridViewCellStyle5;
			this.Column5.HeaderText = "Đơn giá";
			this.Column5.MinimumWidth = 84;
			this.Column5.Name = "Column5";
			this.Column5.ReadOnly = true;
			this.Column5.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column5.Width = 84;
			this.VATasMoney.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.VATasMoney.DataPropertyName = "VATasMoney";
			dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle6.Format = "N2";
			dataGridViewCellStyle6.NullValue = "0";
			this.VATasMoney.DefaultCellStyle = dataGridViewCellStyle6;
			this.VATasMoney.HeaderText = "VAT";
			this.VATasMoney.MinimumWidth = 78;
			this.VATasMoney.Name = "VATasMoney";
			this.VATasMoney.ReadOnly = true;
			this.VATasMoney.Width = 78;
			this.Column6.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column6.DataPropertyName = "ProductMoney";
			dataGridViewCellStyle7.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle7.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle7.ForeColor = Color.Blue;
			dataGridViewCellStyle7.Format = "N0";
			dataGridViewCellStyle7.NullValue = null;
			this.Column6.DefaultCellStyle = dataGridViewCellStyle7;
			this.Column6.HeaderText = "Thành tiền";
			this.Column6.MinimumWidth = 97;
			this.Column6.Name = "Column6";
			this.Column6.ReadOnly = true;
			this.Column6.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.Column6.Width = 97;
			this.Column7.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column7.DataPropertyName = "ProductDate";
			dataGridViewCellStyle8.Format = "dd/MM/yyyy";
			this.Column7.DefaultCellStyle = dataGridViewCellStyle8;
			this.Column7.HeaderText = "Ngày SX";
			this.Column7.MinimumWidth = 80;
			this.Column7.Name = "Column7";
			this.Column7.ReadOnly = true;
			this.Column7.Visible = false;
			this.Column7.Width = 80;
			this.Column8.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column8.DataPropertyName = "ProductExpiryDate";
			dataGridViewCellStyle9.Format = "dd/MM/yyyy";
			this.Column8.DefaultCellStyle = dataGridViewCellStyle9;
			this.Column8.HeaderText = "Hạn dùng";
			this.Column8.MinimumWidth = 90;
			this.Column8.Name = "Column8";
			this.Column8.ReadOnly = true;
			this.Column8.Visible = false;
			this.Column8.Width = 90;
			this.Column9.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.Column9.DataPropertyName = "Pid";
			this.Column9.HeaderText = "Mã sản phẩm";
			this.Column9.Name = "Column9";
			this.Column9.ReadOnly = true;
			this.Column9.Visible = false;
			this.Column20.DataPropertyName = "productPrice1";
			this.Column20.HeaderText = "Giá bán buôn";
			this.Column20.Name = "Column20";
			this.Column20.ReadOnly = true;
			this.Column20.Visible = false;
			this.Column21.DataPropertyName = "productPrice";
			this.Column21.HeaderText = "Giá nhập";
			this.Column21.Name = "Column21";
			this.Column21.ReadOnly = true;
			this.Column21.Visible = false;
			this.Column22.DataPropertyName = "NationalID";
			this.Column22.HeaderText = "NationalID";
			this.Column22.Name = "Column22";
			this.Column22.ReadOnly = true;
			this.Column22.Visible = false;
			this.Column23.DataPropertyName = "VAT";
			this.Column23.HeaderText = "VAT";
			this.Column23.Name = "Column23";
			this.Column23.ReadOnly = true;
			this.Column23.Visible = false;
			this.possName.DataPropertyName = "possName";
			this.possName.HeaderText = "possName";
			this.possName.Name = "possName";
			this.possName.ReadOnly = true;
			this.possName.Visible = false;
			this.Rate.DataPropertyName = "Rate";
			dataGridViewCellStyle10.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle10.NullValue = "1";
			this.Rate.DefaultCellStyle = dataGridViewCellStyle10;
			this.Rate.HeaderText = "Rate";
			this.Rate.Name = "Rate";
			this.Rate.ReadOnly = true;
			this.Rate.Visible = false;
			this.IdRegisters.DataPropertyName = "IdRegisters";
			this.IdRegisters.HeaderText = "IdRegisters";
			this.IdRegisters.Name = "IdRegisters";
			this.IdRegisters.ReadOnly = true;
			this.IdRegisters.Visible = false;
			this.IdControl.DataPropertyName = "IdControl";
			this.IdControl.HeaderText = "IdControl";
			this.IdControl.Name = "IdControl";
			this.IdControl.ReadOnly = true;
			this.IdControl.Visible = false;
			this.IdBisMake.DataPropertyName = "IdBisMake";
			this.IdBisMake.HeaderText = "IdBisMake";
			this.IdBisMake.Name = "IdBisMake";
			this.IdBisMake.ReadOnly = true;
			this.IdBisMake.Visible = false;
			this.IdBisImport.DataPropertyName = "IdBisImport";
			this.IdBisImport.HeaderText = "IdBisImport";
			this.IdBisImport.Name = "IdBisImport";
			this.IdBisImport.ReadOnly = true;
			this.IdBisImport.Visible = false;
			this.BarCode.DataPropertyName = "BarCode";
			this.BarCode.HeaderText = "BarCode";
			this.BarCode.Name = "BarCode";
			this.BarCode.ReadOnly = true;
			this.BarCode.Visible = false;
			this.cmsBill.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			this.cmsBill.Items.AddRange(new ToolStripItem[]
			{
				this.cmsAddProduct,
				this.toolStripSeparator4,
				this.cmsDelProduct,
				this.toolStripSeparator1,
				this.cmsAddBill,
				this.cmsEditBill,
				this.toolStripSeparator2,
				this.cmsSaveBill,
				this.cmsPrintBill,
				this.cmsDellBill,
				this.toolStripSeparator3,
				this.cmsSearchBill
			});
			this.cmsBill.Name = "cmsBill";
			this.cmsBill.Size = new Size(263, 204);
			this.cmsAddProduct.Name = "cmsAddProduct";
			this.cmsAddProduct.Size = new Size(262, 22);
			this.cmsAddProduct.Text = "Thêm sản phẩm";
			this.cmsAddProduct.Click += new EventHandler(this.btnSelect_Click);
			this.toolStripSeparator4.Name = "toolStripSeparator4";
			this.toolStripSeparator4.Size = new Size(259, 6);
			this.toolStripSeparator4.Click += new EventHandler(this.btnSelect_Click);
			this.cmsDelProduct.Name = "cmsDelProduct";
			this.cmsDelProduct.ShortcutKeys = Keys.Delete;
			this.cmsDelProduct.Size = new Size(262, 22);
			this.cmsDelProduct.Text = "Xoá sản phẩm khỏi đơn hàng";
			this.cmsDelProduct.Click += new EventHandler(this.cmsDelProduct_Click);
			this.toolStripSeparator1.Name = "toolStripSeparator1";
			this.toolStripSeparator1.Size = new Size(259, 6);
			this.cmsAddBill.Name = "cmsAddBill";
			this.cmsAddBill.Size = new Size(262, 22);
			this.cmsAddBill.Text = "Tạo mới đơn hàng";
			this.cmsAddBill.Click += new EventHandler(this.cmsAddBill_Click);
			this.cmsEditBill.Name = "cmsEditBill";
			this.cmsEditBill.Size = new Size(262, 22);
			this.cmsEditBill.Text = "Sửa đơn hàng";
			this.cmsEditBill.Click += new EventHandler(this.cmsEditBill_Click);
			this.toolStripSeparator2.Name = "toolStripSeparator2";
			this.toolStripSeparator2.Size = new Size(259, 6);
			this.cmsSaveBill.Enabled = false;
			this.cmsSaveBill.Name = "cmsSaveBill";
			this.cmsSaveBill.Size = new Size(262, 22);
			this.cmsSaveBill.Text = "Lưu đơn hàng";
			this.cmsSaveBill.Click += new EventHandler(this.cmsSaveBill_Click);
			this.cmsPrintBill.Enabled = false;
			this.cmsPrintBill.Name = "cmsPrintBill";
			this.cmsPrintBill.Size = new Size(262, 22);
			this.cmsPrintBill.Text = "In hoá đơn";
			this.cmsPrintBill.Click += new EventHandler(this.cmsPrintBill_Click);
			this.cmsDellBill.Enabled = false;
			this.cmsDellBill.Name = "cmsDellBill";
			this.cmsDellBill.Size = new Size(262, 22);
			this.cmsDellBill.Text = "Xoá hoá đơn";
			this.cmsDellBill.Click += new EventHandler(this.cmsDellBill_Click);
			this.toolStripSeparator3.Name = "toolStripSeparator3";
			this.toolStripSeparator3.Size = new Size(259, 6);
			this.cmsSearchBill.Name = "cmsSearchBill";
			this.cmsSearchBill.Size = new Size(262, 22);
			this.cmsSearchBill.Text = "Tìm kiếm";
			this.cmsSearchBill.Click += new EventHandler(this.cmsSearchBill_Click);
			this.groupBox1.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.groupBox1.Controls.Add(this.label18);
			this.groupBox1.Controls.Add(this.txtPhone);
			this.groupBox1.Controls.Add(this.label8);
			this.groupBox1.Controls.Add(this.txtAddress);
			this.groupBox1.Controls.Add(this.label6);
			this.groupBox1.Controls.Add(this.txtAge);
			this.groupBox1.Controls.Add(this.label5);
			this.groupBox1.Controls.Add(this.cbbSex);
			this.groupBox1.Controls.Add(this.txtName);
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label2);
			this.groupBox1.Controls.Add(this.txtDate);
			this.groupBox1.Controls.Add(this.txtID);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.btnFind);
			this.groupBox1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new System.Drawing.Point(233, 5);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(710, 90);
			this.groupBox1.TabIndex = 50;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thông tin hoá đơn";
			this.label18.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label18.AutoSize = true;
			this.label18.BackColor = SystemColors.ButtonFace;
			this.label18.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label18.Location = new System.Drawing.Point(612, 29);
			this.label18.Name = "label18";
			this.label18.Size = new Size(11, 15);
			this.label18.TabIndex = 36;
			this.label18.Text = "-";
			this.label18.TextAlign = ContentAlignment.MiddleRight;
			this.txtPhone.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtPhone.BackColor = Color.White;
			this.txtPhone.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtPhone.Location = new System.Drawing.Point(562, 54);
			this.txtPhone.Name = "txtPhone";
			this.txtPhone.ReadOnly = true;
			this.txtPhone.Size = new Size(138, 22);
			this.txtPhone.TabIndex = 7;
			this.txtPhone.Leave += new EventHandler(this.txtPhone_Leave);
			this.txtPhone.KeyPress += new KeyPressEventHandler(this.txtPhone_KeyPress);
			this.txtPhone.Enter += new EventHandler(this.txtPhone_Enter);
			this.label8.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label8.AutoSize = true;
			this.label8.BackColor = SystemColors.ButtonFace;
			this.label8.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label8.Location = new System.Drawing.Point(489, 57);
			this.label8.Name = "label8";
			this.label8.Size = new Size(70, 15);
			this.label8.TabIndex = 30;
			this.label8.Text = "Điện thoại :";
			this.label8.TextAlign = ContentAlignment.MiddleRight;
			this.txtAddress.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtAddress.BackColor = Color.White;
			this.txtAddress.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtAddress.Location = new System.Drawing.Point(284, 54);
			this.txtAddress.Name = "txtAddress";
			this.txtAddress.ReadOnly = true;
			this.txtAddress.Size = new Size(200, 22);
			this.txtAddress.TabIndex = 6;
			this.txtAddress.Leave += new EventHandler(this.txtAddress_Leave);
			this.txtAddress.KeyPress += new KeyPressEventHandler(this.txtAddress_KeyPress);
			this.txtAddress.Enter += new EventHandler(this.txtAddress_Enter);
			this.label6.AutoSize = true;
			this.label6.BackColor = SystemColors.ButtonFace;
			this.label6.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label6.Location = new System.Drawing.Point(229, 57);
			this.label6.Name = "label6";
			this.label6.Size = new Size(52, 15);
			this.label6.TabIndex = 28;
			this.label6.Text = "Địa chỉ :";
			this.label6.TextAlign = ContentAlignment.MiddleRight;
			this.txtAge.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtAge.BackColor = Color.White;
			this.txtAge.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtAge.Location = new System.Drawing.Point(562, 26);
			this.txtAge.Name = "txtAge";
			this.txtAge.ReadOnly = true;
			this.txtAge.Size = new Size(49, 22);
			this.txtAge.TabIndex = 4;
			this.txtAge.TextAlign = HorizontalAlignment.Right;
			this.txtAge.Leave += new EventHandler(this.txtAge_Leave);
			this.txtAge.KeyPress += new KeyPressEventHandler(this.txtAge_KeyPress);
			this.txtAge.Enter += new EventHandler(this.txtAge_Enter);
			this.label5.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.label5.AutoSize = true;
			this.label5.BackColor = SystemColors.ButtonFace;
			this.label5.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label5.Location = new System.Drawing.Point(498, 29);
			this.label5.Name = "label5";
			this.label5.Size = new Size(61, 15);
			this.label5.TabIndex = 26;
			this.label5.Text = "Tuổi - GT :";
			this.label5.TextAlign = ContentAlignment.MiddleRight;
			this.cbbSex.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.cbbSex.BackColor = Color.White;
			this.cbbSex.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbSex.FlatStyle = FlatStyle.Flat;
			this.cbbSex.Font = new Font("Arial", 7.25f);
			this.cbbSex.FormattingEnabled = true;
			this.cbbSex.Items.AddRange(new object[]
			{
				"NAM",
				"NỮ"
			});
			this.cbbSex.Location = new System.Drawing.Point(625, 26);
			this.cbbSex.Name = "cbbSex";
			this.cbbSex.Size = new Size(75, 21);
			this.cbbSex.TabIndex = 5;
			this.cbbSex.KeyPress += new KeyPressEventHandler(this.cbbSex_KeyPress);
			this.txtName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtName.BackColor = Color.White;
			this.txtName.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtName.Location = new System.Drawing.Point(284, 26);
			this.txtName.Name = "txtName";
			this.txtName.ReadOnly = true;
			this.txtName.Size = new Size(200, 22);
			this.txtName.TabIndex = 3;
			this.toolTip1.SetToolTip(this.txtName, "Nháy đúp chuột để chọn khách hàng từ danh sách");
			this.txtName.DoubleClick += new EventHandler(this.txtName_DoubleClick);
			this.txtName.Leave += new EventHandler(this.txtName_Leave);
			this.txtName.KeyPress += new KeyPressEventHandler(this.txtName_KeyPress);
			this.txtName.Enter += new EventHandler(this.txtName_Enter);
			this.label3.AutoSize = true;
			this.label3.BackColor = SystemColors.ButtonFace;
			this.label3.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label3.Location = new System.Drawing.Point(201, 29);
			this.label3.Name = "label3";
			this.label3.Size = new Size(80, 15);
			this.label3.TabIndex = 22;
			this.label3.Text = "Khách hàng :";
			this.label3.TextAlign = ContentAlignment.MiddleRight;
			this.label2.AutoSize = true;
			this.label2.BackColor = SystemColors.ButtonFace;
			this.label2.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label2.Location = new System.Drawing.Point(16, 57);
			this.label2.Name = "label2";
			this.label2.Size = new Size(69, 15);
			this.label2.TabIndex = 19;
			this.label2.Text = "Ngày xuất :";
			this.label2.TextAlign = ContentAlignment.MiddleRight;
			this.txtDate.CustomFormat = "dd/MM/yyyy";
			this.txtDate.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtDate.Format = DateTimePickerFormat.Custom;
			this.txtDate.Location = new System.Drawing.Point(90, 54);
			this.txtDate.Name = "txtDate";
			this.txtDate.Size = new Size(107, 22);
			this.txtDate.TabIndex = 2;
			this.txtDate.KeyPress += new KeyPressEventHandler(this.txtDate_KeyPress);
			this.txtID.BackColor = Color.White;
			this.txtID.CharacterCasing = CharacterCasing.Upper;
			this.txtID.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtID.Location = new System.Drawing.Point(90, 26);
			this.txtID.Name = "txtID";
			this.txtID.ReadOnly = true;
			this.txtID.Size = new Size(107, 22);
			this.txtID.TabIndex = 2;
			this.txtID.Leave += new EventHandler(this.txtID_Leave);
			this.txtID.KeyPress += new KeyPressEventHandler(this.txtID_KeyPress);
			this.txtID.Enter += new EventHandler(this.txtID_Enter);
			this.label1.AutoSize = true;
			this.label1.BackColor = SystemColors.ButtonFace;
			this.label1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label1.Location = new System.Drawing.Point(7, 29);
			this.label1.Name = "label1";
			this.label1.Size = new Size(78, 15);
			this.label1.TabIndex = 16;
			this.label1.Text = "Số hoá đơn :";
			this.label1.TextAlign = ContentAlignment.MiddleRight;
			this.btnFind.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.btnFind.BackColor = Color.White;
			this.btnFind.Enabled = false;
			this.btnFind.FlatAppearance.BorderColor = Color.FromArgb(192, 255, 255);
			this.btnFind.FlatAppearance.BorderSize = 0;
			this.btnFind.FlatStyle = FlatStyle.Flat;
//			this.btnFind.Image = (Image)componentResourceManager.GetObject("btnFind.Image");
			this.btnFind.Location = new System.Drawing.Point(466, 28);
			this.btnFind.Name = "btnFind";
			this.btnFind.Size = new Size(14, 17);
			this.btnFind.TabIndex = 35;
			this.toolTip1.SetToolTip(this.btnFind, "Chọn khách hàng từ danh sách");
			this.btnFind.UseVisualStyleBackColor = false;
			this.btnFind.Click += new EventHandler(this.btnFind_Click);
			this.txtDoctorDesease.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.txtDoctorDesease.BackColor = Color.White;
			this.txtDoctorDesease.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtDoctorDesease.Location = new System.Drawing.Point(340, 502);
			this.txtDoctorDesease.Name = "txtDoctorDesease";
			this.txtDoctorDesease.ReadOnly = true;
			this.txtDoctorDesease.Size = new Size(176, 22);
			this.txtDoctorDesease.TabIndex = 18;
			this.txtDoctorDesease.Leave += new EventHandler(this.txtDoctorDesease_Leave);
			this.txtDoctorDesease.KeyPress += new KeyPressEventHandler(this.txtDoctorDesease_KeyPress);
			this.txtDoctorDesease.Enter += new EventHandler(this.txtDoctorDesease_Enter);
			this.label4.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.label4.AutoSize = true;
			this.label4.BackColor = Color.White;
			this.label4.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label4.Location = new System.Drawing.Point(245, 505);
			this.label4.Name = "label4";
			this.label4.Size = new Size(92, 15);
			this.label4.TabIndex = 34;
			this.label4.Text = "Mục đích mua :";
			this.txtNote.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.txtNote.BackColor = Color.White;
			this.txtNote.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtNote.Location = new System.Drawing.Point(340, 528);
			this.txtNote.Name = "txtNote";
			this.txtNote.ReadOnly = true;
			this.txtNote.Size = new Size(176, 22);
			this.txtNote.TabIndex = 19;
			this.txtNote.Leave += new EventHandler(this.txtNote_Leave);
			this.txtNote.KeyPress += new KeyPressEventHandler(this.txtNote_KeyPress);
			this.txtNote.Enter += new EventHandler(this.txtNote_Enter);
			this.label9.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.label9.AutoSize = true;
			this.label9.BackColor = Color.White;
			this.label9.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label9.Location = new System.Drawing.Point(281, 532);
			this.label9.Name = "label9";
			this.label9.Size = new Size(55, 15);
			this.label9.TabIndex = 32;
			this.label9.Text = "Ghi chú :";
			this.txtTotalMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtTotalMoney.BackColor = Color.White;
			this.txtTotalMoney.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.txtTotalMoney.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtTotalMoney.Location = new System.Drawing.Point(832, 528);
			this.txtTotalMoney.Name = "txtTotalMoney";
			this.txtTotalMoney.ReadOnly = true;
			this.txtTotalMoney.Size = new Size(107, 21);
			this.txtTotalMoney.TabIndex = 9;
			this.txtTotalMoney.Text = "0";
			this.txtTotalMoney.TextAlign = HorizontalAlignment.Right;
			this.txtTotalMoney.Leave += new EventHandler(this.txtTotalMoney_Leave);
			this.txtTotalMoney.KeyPress += new KeyPressEventHandler(this.txtTotalMoney_KeyPress);
			this.txtTotalMoney.Enter += new EventHandler(this.txtTotalMoney_Enter);
			this.label7.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label7.AutoSize = true;
			this.label7.BackColor = Color.White;
			this.label7.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label7.Location = new System.Drawing.Point(728, 506);
			this.label7.Name = "label7";
			this.label7.Size = new Size(101, 15);
			this.label7.TabIndex = 20;
			this.label7.Text = "Cộng thành tiền :";
			this.btnListUnit.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.btnListUnit.BackColor = Color.FromArgb(255, 255, 192);
			this.btnListUnit.FlatAppearance.BorderSize = 0;
			this.btnListUnit.FlatStyle = FlatStyle.Flat;
//			this.btnListUnit.Image = (Image)componentResourceManager.GetObject("btnListUnit.Image");
			this.btnListUnit.Location = new System.Drawing.Point(577, 126);
			this.btnListUnit.Name = "btnListUnit";
			this.btnListUnit.Size = new Size(15, 16);
			this.btnListUnit.TabIndex = 129;
			this.toolTip1.SetToolTip(this.btnListUnit, "Chọn đơn vị khác của sản phẩm");
			this.btnListUnit.UseVisualStyleBackColor = false;
			this.btnListUnit.Click += new EventHandler(this.btnListUnit_Click);
			this.btnSelect.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.btnSelect.BackColor = Color.White;
			this.btnSelect.Enabled = false;
			this.btnSelect.FlatAppearance.BorderColor = Color.Cyan;
			this.btnSelect.FlatAppearance.BorderSize = 0;
			this.btnSelect.FlatStyle = FlatStyle.Flat;
			//this.btnSelect.Image = (Image)componentResourceManager.GetObject("btnSelect.Image");
			this.btnSelect.Location = new System.Drawing.Point(395, 126);
			this.btnSelect.Name = "btnSelect";
			this.btnSelect.Size = new Size(22, 16);
			this.btnSelect.TabIndex = 11;
			this.toolTip1.SetToolTip(this.btnSelect, "Chọn sản phẩm cần xuất");
			this.btnSelect.UseVisualStyleBackColor = false;
			this.btnSelect.Click += new EventHandler(this.btnSelect_Click);
			this.txtBarcode.BackColor = Color.FromArgb(255, 255, 192);
			this.txtBarcode.Font = new Font("Arial", 12f, FontStyle.Bold);
			this.txtBarcode.Location = new System.Drawing.Point(8, 24);
			this.txtBarcode.Name = "txtBarcode";
			this.txtBarcode.ReadOnly = true;
			this.txtBarcode.Size = new Size(209, 26);
			this.txtBarcode.TabIndex = 33;
			this.txtBarcode.KeyDown += new KeyEventHandler(this.txtBarcode_KeyDown);
			this.lblPossName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblPossName.BackColor = Color.White;
			this.lblPossName.BorderStyle = BorderStyle.Fixed3D;
			this.lblPossName.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.lblPossName.ForeColor = Color.Blue;
			this.lblPossName.Location = new System.Drawing.Point(322, 269);
			this.lblPossName.Name = "lblPossName";
			this.lblPossName.Size = new Size(2, 22);
			this.lblPossName.TabIndex = 540;
			this.lblPossName.Text = "-:-";
			this.lblPossName.TextAlign = ContentAlignment.MiddleLeft;
			this.cbbPacket.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.cbbPacket.BackColor = Color.White;
			this.cbbPacket.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbPacket.FlatStyle = FlatStyle.Flat;
			this.cbbPacket.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.cbbPacket.FormattingEnabled = true;
			this.cbbPacket.Location = new System.Drawing.Point(421, 122);
			this.cbbPacket.Name = "cbbPacket";
			this.cbbPacket.Size = new Size(95, 24);
			this.cbbPacket.TabIndex = 13;
			this.cbbPacket.SelectedIndexChanged += new EventHandler(this.cbbPacket_SelectedIndexChanged);
			this.cbbPacket.KeyPress += new KeyPressEventHandler(this.cbbPacket_KeyPress);
			this.cbbPacket.SelectedValueChanged += new EventHandler(this.cbbPacket_SelectedIndexChanged);
			this.label22.AutoSize = true;
			this.label22.Location = new System.Drawing.Point(350, 126);
			this.label22.Name = "label22";
			this.label22.Size = new Size(39, 15);
			this.label22.TabIndex = 53;
			this.label22.Text = "Vị trí : ";
			this.txtProductNumber.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductNumber.BackColor = Color.White;
			this.txtProductNumber.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductNumber.Location = new System.Drawing.Point(604, 123);
			this.txtProductNumber.Name = "txtProductNumber";
			this.txtProductNumber.Size = new Size(78, 22);
			this.txtProductNumber.TabIndex = 16;
			this.txtProductNumber.TextAlign = HorizontalAlignment.Right;
			this.txtProductNumber.TextChanged += new EventHandler(this.txtProductNumber_TextChanged);
			this.txtProductNumber.Leave += new EventHandler(this.txtProductNumber_Leave);
			this.txtProductNumber.KeyPress += new KeyPressEventHandler(this.txtProductNumber_KeyPress);
			this.txtProductNumber.Enter += new EventHandler(this.txtProductNumber_Enter);
			this.txtProductPrice.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductPrice.BackColor = Color.White;
			this.txtProductPrice.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductPrice.Location = new System.Drawing.Point(683, 123);
			this.txtProductPrice.Name = "txtProductPrice";
			this.txtProductPrice.ReadOnly = true;
			this.txtProductPrice.Size = new Size(84, 22);
			this.txtProductPrice.TabIndex = 15;
			this.txtProductPrice.TextAlign = HorizontalAlignment.Right;
			this.txtProductPrice.TextChanged += new EventHandler(this.txtProductPrice_TextChanged);
			this.txtProductPrice.Leave += new EventHandler(this.txtProductPrice_Leave);
			this.txtProductPrice.KeyPress += new KeyPressEventHandler(this.txtProductPrice_KeyPress);
			this.txtProductPrice.Enter += new EventHandler(this.txtProductPrice_Enter);
			this.txtProductUnit.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtProductUnit.BackColor = Color.White;
			this.txtProductUnit.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductUnit.Location = new System.Drawing.Point(517, 123);
			this.txtProductUnit.Name = "txtProductUnit";
			this.txtProductUnit.ReadOnly = true;
			this.txtProductUnit.Size = new Size(86, 22);
			this.txtProductUnit.TabIndex = 14;
			this.txtProductUnit.DoubleClick += new EventHandler(this.txtProductUnit_DoubleClick);
			this.txtProductUnit.TextChanged += new EventHandler(this.txtProductUnit_TextChanged);
			this.txtProductUnit.Leave += new EventHandler(this.txtProductUnit_Leave);
			this.txtProductUnit.KeyPress += new KeyPressEventHandler(this.txtProductUnit_KeyPress);
			this.txtProductUnit.Enter += new EventHandler(this.txtProductUnit_Enter);
			this.txtProductName.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtProductName.BackColor = Color.White;
			this.txtProductName.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductName.Location = new System.Drawing.Point(237, 123);
			this.txtProductName.Name = "txtProductName";
			this.txtProductName.Size = new Size(183, 22);
			this.txtProductName.TabIndex = 12;
			this.txtProductName.TextChanged += new EventHandler(this.txtProductName_TextChanged);
			this.txtProductName.KeyDown += new KeyEventHandler(this.txtProductName_KeyDown);
			this.txtProductName.Leave += new EventHandler(this.txtProductName_Leave);
			this.txtProductName.KeyPress += new KeyPressEventHandler(this.txtProductName_KeyPress);
			this.txtProductName.Enter += new EventHandler(this.txtProductName_Enter);
			this.txtBalancer.BackColor = SystemColors.Control;
			this.txtBalancer.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtBalancer.Location = new System.Drawing.Point(643, 123);
			this.txtBalancer.Name = "txtBalancer";
			this.txtBalancer.ReadOnly = true;
			this.txtBalancer.Size = new Size(91, 22);
			this.txtBalancer.TabIndex = 190;
			this.txtBalancer.TextAlign = HorizontalAlignment.Right;
			this.txtBalancer.Leave += new EventHandler(this.txtBalancer_Leave);
			this.label21.AutoSize = true;
			this.label21.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label21.ForeColor = Color.Blue;
			this.label21.Location = new System.Drawing.Point(579, 126);
			this.label21.Name = "label21";
			this.label21.Size = new Size(58, 15);
			this.label21.TabIndex = 41;
			this.label21.Text = "Tồn kho :";
			this.cbbNational.BackColor = Color.White;
			this.cbbNational.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbNational.Enabled = false;
			this.cbbNational.FormattingEnabled = true;
			this.cbbNational.Items.AddRange(new object[]
			{
				"      0%",
				"      5%",
				"    10%"
			});
			this.cbbNational.Location = new System.Drawing.Point(839, 101);
			this.cbbNational.Name = "cbbNational";
			this.cbbNational.Size = new Size(56, 23);
			this.cbbNational.TabIndex = 170;
			this.label20.AutoSize = true;
			this.label20.Location = new System.Drawing.Point(789, 128);
			this.label20.Name = "label20";
			this.label20.Size = new Size(53, 15);
			this.label20.TabIndex = 39;
			this.label20.Text = "Xuất xứ :";
			this.txtProductMoney.BackColor = Color.White;
			this.txtProductMoney.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtProductMoney.Location = new System.Drawing.Point(109, 100);
			this.txtProductMoney.Name = "txtProductMoney";
			this.txtProductMoney.ReadOnly = true;
			this.txtProductMoney.Size = new Size(114, 22);
			this.txtProductMoney.TabIndex = 180;
			this.txtProductMoney.TextAlign = HorizontalAlignment.Right;
			this.txtProductMoney.TextChanged += new EventHandler(this.txtProductMoney_TextChanged);
			this.txtProductMoney.Leave += new EventHandler(this.txtProductMoney_Leave);
			this.label12.AutoSize = true;
			this.label12.Location = new System.Drawing.Point(35, 103);
			this.label12.Name = "label12";
			this.label12.Size = new Size(71, 15);
			this.label12.TabIndex = 22;
			this.label12.Text = "Thành tiền :";
			this.dptProductExpiryDate.CalendarForeColor = Color.Red;
			this.dptProductExpiryDate.CustomFormat = "dd/MM/yyyy";
			this.dptProductExpiryDate.Enabled = false;
			this.dptProductExpiryDate.Format = DateTimePickerFormat.Custom;
			this.dptProductExpiryDate.Location = new System.Drawing.Point(835, 101);
			this.dptProductExpiryDate.Name = "dptProductExpiryDate";
			this.dptProductExpiryDate.Size = new Size(60, 21);
			this.dptProductExpiryDate.TabIndex = 140;
			this.label16.AutoSize = true;
			this.label16.ForeColor = Color.Red;
			this.label16.Location = new System.Drawing.Point(796, 128);
			this.label16.Name = "label16";
			this.label16.Size = new Size(39, 15);
			this.label16.TabIndex = 30;
			this.label16.Text = "HSD :";
			this.dtpProductDate.CustomFormat = "dd/MM/yyyy";
			this.dtpProductDate.Enabled = false;
			this.dtpProductDate.Format = DateTimePickerFormat.Custom;
			this.dtpProductDate.Location = new System.Drawing.Point(693, 126);
			this.dtpProductDate.Name = "dtpProductDate";
			this.dtpProductDate.Size = new Size(100, 21);
			this.dtpProductDate.TabIndex = 130;
			this.label15.AutoSize = true;
			this.label15.ForeColor = Color.Red;
			this.label15.Location = new System.Drawing.Point(631, 128);
			this.label15.Name = "label15";
			this.label15.Size = new Size(59, 15);
			this.label15.TabIndex = 28;
			this.label15.Text = "Ngày SX :";
			this.btnAddToBill.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnAddToBill.BackColor = Color.White;
			this.btnAddToBill.Enabled = false;
			this.btnAddToBill.FlatAppearance.BorderColor = Color.FromArgb(192, 255, 255);
			this.btnAddToBill.FlatStyle = FlatStyle.Flat;
			this.btnAddToBill.Location = new System.Drawing.Point(6, 566);
			this.btnAddToBill.Name = "btnAddToBill";
			this.btnAddToBill.Size = new Size(140, 26);
			this.btnAddToBill.TabIndex = 200;
			this.btnAddToBill.Text = "Thêm sản phẩm  [ F3 ]";
			this.btnAddToBill.UseVisualStyleBackColor = false;
			this.btnAddToBill.Click += new EventHandler(this.btnAddToBill_Click);
			this.btnSearch.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnSearch.BackColor = SystemColors.ButtonFace;
			this.btnSearch.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnSearch.FlatStyle = FlatStyle.Flat;
			this.btnSearch.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnSearch.Location = new System.Drawing.Point(558, 564);
			this.btnSearch.Name = "btnSearch";
			this.btnSearch.Size = new Size(105, 26);
			this.btnSearch.TabIndex = 25;
			this.btnSearch.Text = "Tìm kiếm [ F9 ]";
			this.btnSearch.UseVisualStyleBackColor = false;
			this.btnSearch.Click += new EventHandler(this.btnSearch_Click);
			this.txtBalancerAllPacket.BackColor = SystemColors.Control;
			this.txtBalancerAllPacket.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.txtBalancerAllPacket.Location = new System.Drawing.Point(134, 99);
			this.txtBalancerAllPacket.Name = "txtBalancerAllPacket";
			this.txtBalancerAllPacket.ReadOnly = true;
			this.txtBalancerAllPacket.Size = new Size(95, 22);
			this.txtBalancerAllPacket.TabIndex = 530;
			this.txtBalancerAllPacket.TextAlign = HorizontalAlignment.Right;
			this.cbbWareHouse.BackColor = Color.White;
			this.cbbWareHouse.Cursor = Cursors.Hand;
			this.cbbWareHouse.DropDownStyle = ComboBoxStyle.DropDownList;
			this.cbbWareHouse.FlatStyle = FlatStyle.Flat;
			this.cbbWareHouse.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.cbbWareHouse.FormattingEnabled = true;
			this.cbbWareHouse.Location = new System.Drawing.Point(7, 196);
			this.cbbWareHouse.Name = "cbbWareHouse";
			this.cbbWareHouse.Size = new Size(220, 23);
			this.cbbWareHouse.TabIndex = 86;
			this.label26.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label26.BackColor = Color.White;
			this.label26.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label26.Location = new System.Drawing.Point(233, 497);
			this.label26.Name = "label26";
			this.label26.Size = new Size(710, 57);
			this.label26.TabIndex = 91;
			this.groupBox4.Controls.Add(this.label24);
			this.groupBox4.Controls.Add(this.txtBarcode);
			this.groupBox4.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox4.ForeColor = Color.FromArgb(0, 64, 64);
			this.groupBox4.Location = new System.Drawing.Point(6, 5);
			this.groupBox4.Name = "groupBox4";
			this.groupBox4.Size = new Size(223, 90);
			this.groupBox4.TabIndex = 155;
			this.groupBox4.TabStop = false;
			this.groupBox4.Text = "Mã vạch sản phẩm";
			this.label24.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 163);
//			this.label24.Image = (Image)componentResourceManager.GetObject("label24.Image");
			this.label24.Location = new System.Drawing.Point(8, 56);
			this.label24.Name = "label24";
			this.label24.Size = new Size(209, 25);
			this.label24.TabIndex = 34;
			this.label24.Click += new EventHandler(this.label28_DoubleClick);
			this.lblProduct.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblProduct.Enabled = false;
			this.lblProduct.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.lblProduct.FlatAppearance.BorderSize = 0;
			this.lblProduct.FlatStyle = FlatStyle.Flat;
			this.lblProduct.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblProduct.Location = new System.Drawing.Point(237, 101);
			this.lblProduct.Name = "lblProduct";
			this.lblProduct.Size = new Size(183, 20);
			this.lblProduct.TabIndex = 170;
			this.lblProduct.Text = "SẢN PHẨM";
			this.lblProduct.UseVisualStyleBackColor = true;
			this.lblPrice.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblPrice.Enabled = false;
			this.lblPrice.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.lblPrice.FlatAppearance.BorderSize = 0;
			this.lblPrice.FlatStyle = FlatStyle.Flat;
			this.lblPrice.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblPrice.Location = new System.Drawing.Point(683, 101);
			this.lblPrice.Name = "lblPrice";
			this.lblPrice.Size = new Size(84, 20);
			this.lblPrice.TabIndex = 168;
			this.lblPrice.Text = "ĐƠN GIÁ";
			this.lblPrice.UseVisualStyleBackColor = true;
			this.lblMoney.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblMoney.Enabled = false;
			this.lblMoney.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.lblMoney.FlatAppearance.BorderSize = 0;
			this.lblMoney.FlatStyle = FlatStyle.Flat;
			this.lblMoney.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblMoney.Location = new System.Drawing.Point(844, 101);
			this.lblMoney.Name = "lblMoney";
			this.lblMoney.Size = new Size(97, 20);
			this.lblMoney.TabIndex = 169;
			this.lblMoney.Text = "THÀNH TIỀN";
			this.lblMoney.UseVisualStyleBackColor = true;
			this.lblNumber.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblNumber.Enabled = false;
			this.lblNumber.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.lblNumber.FlatAppearance.BorderSize = 0;
			this.lblNumber.FlatStyle = FlatStyle.Flat;
			this.lblNumber.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblNumber.Location = new System.Drawing.Point(604, 101);
			this.lblNumber.Name = "lblNumber";
			this.lblNumber.Size = new Size(78, 20);
			this.lblNumber.TabIndex = 167;
			this.lblNumber.Text = "SỐ LƯỢNG";
			this.lblNumber.UseVisualStyleBackColor = true;
			this.lblUnit.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblUnit.Enabled = false;
			this.lblUnit.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.lblUnit.FlatAppearance.BorderSize = 0;
			this.lblUnit.FlatStyle = FlatStyle.Flat;
			this.lblUnit.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblUnit.Location = new System.Drawing.Point(517, 101);
			this.lblUnit.Name = "lblUnit";
			this.lblUnit.Size = new Size(86, 20);
			this.lblUnit.TabIndex = 166;
			this.lblUnit.Text = "ĐƠN VỊ TÍNH";
			this.lblUnit.UseVisualStyleBackColor = true;
			this.lblPacket.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.lblPacket.Enabled = false;
			this.lblPacket.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.lblPacket.FlatAppearance.BorderSize = 0;
			this.lblPacket.FlatStyle = FlatStyle.Flat;
			this.lblPacket.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.lblPacket.Location = new System.Drawing.Point(421, 101);
			this.lblPacket.Name = "lblPacket";
			this.lblPacket.Size = new Size(95, 20);
			this.lblPacket.TabIndex = 165;
			this.lblPacket.Text = "SỐ LÔ";
			this.lblPacket.UseVisualStyleBackColor = true;
			this.label19.BackColor = Color.FromArgb(255, 255, 192);
			this.label19.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.label19.Location = new System.Drawing.Point(7, 99);
			this.label19.Name = "label19";
			this.label19.Size = new Size(235, 23);
			this.label19.TabIndex = 164;
			this.label19.Text = "THÔNG TIN VỀ SẢN PHẨM :  ";
			this.label19.TextAlign = ContentAlignment.MiddleRight;
			this.label27.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.label27.BackColor = Color.FromArgb(255, 255, 192);
			this.label27.Location = new System.Drawing.Point(233, 99);
			this.label27.Name = "label27";
			this.label27.Size = new Size(710, 50);
			this.label27.TabIndex = 163;
			this.txtMoney.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtMoney.BackColor = Color.White;
			this.txtMoney.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.txtMoney.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtMoney.Location = new System.Drawing.Point(832, 502);
			this.txtMoney.Name = "txtMoney";
			this.txtMoney.ReadOnly = true;
			this.txtMoney.Size = new Size(107, 21);
			this.txtMoney.TabIndex = 172;
			this.txtMoney.Text = "0";
			this.txtMoney.TextAlign = HorizontalAlignment.Right;
			this.txtMoney.TextChanged += new EventHandler(this.txtMoney_TextChanged);
			this.label10.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label10.AutoSize = true;
			this.label10.BackColor = Color.White;
			this.label10.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label10.ForeColor = SystemColors.MenuText;
			this.label10.Location = new System.Drawing.Point(753, 531);
			this.label10.Name = "label10";
			this.label10.Size = new Size(76, 16);
			this.label10.TabIndex = 171;
			this.label10.Text = "Tổng tiền :";
			this.txtMoneyAfterDiscount.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtMoneyAfterDiscount.BackColor = Color.White;
			this.txtMoneyAfterDiscount.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.txtMoneyAfterDiscount.ForeColor = Color.Blue;
			this.txtMoneyAfterDiscount.Location = new System.Drawing.Point(650, 528);
			this.txtMoneyAfterDiscount.Name = "txtMoneyAfterDiscount";
			this.txtMoneyAfterDiscount.Size = new Size(78, 21);
			this.txtMoneyAfterDiscount.TabIndex = 21;
			this.txtMoneyAfterDiscount.Text = "0";
			this.txtMoneyAfterDiscount.TextAlign = HorizontalAlignment.Right;
			this.txtMoneyAfterDiscount.Leave += new EventHandler(this.txtMoneyAfterDiscount_Leave);
			this.txtDiscountOut.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtDiscountOut.BackColor = Color.White;
			this.txtDiscountOut.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.txtDiscountOut.ForeColor = Color.Blue;
			this.txtDiscountOut.Location = new System.Drawing.Point(621, 528);
			this.txtDiscountOut.Name = "txtDiscountOut";
			this.txtDiscountOut.ReadOnly = true;
			this.txtDiscountOut.Size = new Size(27, 21);
			this.txtDiscountOut.TabIndex = 20;
			this.txtDiscountOut.Text = "0";
			this.txtDiscountOut.TextAlign = HorizontalAlignment.Right;
			this.txtDiscountOut.TextChanged += new EventHandler(this.txtDiscountOut_TextChanged);
			this.txtDiscountOut.KeyPress += new KeyPressEventHandler(this.txtDiscountOut_KeyPress);
			this.label11.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label11.AutoSize = true;
			this.label11.BackColor = Color.White;
			this.label11.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label11.Location = new System.Drawing.Point(554, 531);
			this.label11.Name = "label11";
			this.label11.Size = new Size(64, 16);
			this.label11.TabIndex = 173;
			this.label11.Text = "CK [ % ] :";
			this.toolTip1.IsBalloon = true;
			this.btnStopSlide.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnStopSlide.BackColor = SystemColors.ButtonFace;
			this.btnStopSlide.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.btnStopSlide.FlatStyle = FlatStyle.Flat;
			this.btnStopSlide.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnStopSlide.Location = new System.Drawing.Point(667, 564);
			this.btnStopSlide.Name = "btnStopSlide";
			this.btnStopSlide.Size = new Size(141, 26);
			this.btnStopSlide.TabIndex = 1558;
			this.btnStopSlide.Text = "Dừng xem";
			this.btnStopSlide.UseVisualStyleBackColor = false;
			this.btnStopSlide.Visible = false;
			this.btnStopSlide.Click += new EventHandler(this.btnStopSlide_Click);
			this.timer2.Interval = 1000;
			this.timer2.Tick += new EventHandler(this.timer2_Tick);
			this.timer1.Tick += new EventHandler(this.timer1_Tick);
			this.txtTotalVAT.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.txtTotalVAT.BackColor = Color.White;
			this.txtTotalVAT.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.txtTotalVAT.ForeColor = Color.FromArgb(0, 0, 192);
			this.txtTotalVAT.Location = new System.Drawing.Point(621, 502);
			this.txtTotalVAT.Name = "txtTotalVAT";
			this.txtTotalVAT.ReadOnly = true;
			this.txtTotalVAT.Size = new Size(106, 21);
			this.txtTotalVAT.TabIndex = 1562;
			this.txtTotalVAT.Text = "0";
			this.txtTotalVAT.TextAlign = HorizontalAlignment.Right;
			this.label13.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.label13.AutoSize = true;
			this.label13.BackColor = Color.White;
			this.label13.Font = new Font("Arial", 9.75f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label13.Location = new System.Drawing.Point(519, 505);
			this.label13.Name = "label13";
			this.label13.Size = new Size(99, 16);
			this.label13.TabIndex = 1561;
			this.label13.Text = "Tổng tiền VAT:";
			this.button1.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.button1.Enabled = false;
			this.button1.FlatAppearance.BorderColor = Color.FromArgb(255, 192, 255);
			this.button1.FlatAppearance.BorderSize = 0;
			this.button1.FlatStyle = FlatStyle.Flat;
			this.button1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.button1.Location = new System.Drawing.Point(768, 101);
			this.button1.Name = "button1";
			this.button1.Size = new Size(75, 20);
			this.button1.TabIndex = 1564;
			this.button1.Text = "VAT";
			this.button1.UseVisualStyleBackColor = true;
			this.txtVAT.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.txtVAT.BackColor = Color.White;
			this.txtVAT.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.txtVAT.Location = new System.Drawing.Point(768, 123);
			this.txtVAT.Name = "txtVAT";
			this.txtVAT.ReadOnly = true;
			this.txtVAT.Size = new Size(75, 22);
			this.txtVAT.TabIndex = 1563;
			this.txtVAT.TextAlign = HorizontalAlignment.Right;
			this.button2.Anchor = (AnchorStyles.Top | AnchorStyles.Right);
			this.button2.BackColor = Color.FromArgb(255, 255, 192);
			this.button2.Enabled = false;
			this.button2.FlatAppearance.BorderSize = 0;
			this.button2.FlatStyle = FlatStyle.Flat;
			this.button2.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.button2.ForeColor = Color.FromArgb(0, 64, 64);
			this.button2.Location = new System.Drawing.Point(844, 123);
			this.button2.Name = "button2";
			this.button2.Size = new Size(97, 22);
			this.button2.TabIndex = 1565;
			this.button2.Text = "VNĐ";
			this.button2.UseVisualStyleBackColor = false;
			this.label14.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.label14.BackColor = Color.White;
			this.label14.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label14.Location = new System.Drawing.Point(6, 559);
			this.label14.Name = "label14";
			this.label14.Size = new Size(937, 36);
			this.label14.TabIndex = 1566;
			this.label29.BackColor = Color.FromArgb(224, 224, 224);
			this.label29.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label29.Location = new System.Drawing.Point(7, 174);
			this.label29.Name = "label29";
			this.label29.Size = new Size(220, 22);
			this.label29.TabIndex = 1572;
			this.label29.Text = "Kho xuất thuốc";
			this.label29.TextAlign = ContentAlignment.MiddleCenter;
			this.label23.BackColor = Color.FromArgb(224, 224, 224);
			this.label23.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 0);
			this.label23.Location = new System.Drawing.Point(7, 224);
			this.label23.Name = "label23";
			this.label23.Size = new Size(220, 20);
			this.label23.TabIndex = 1573;
			this.label23.Text = "Danh sách hoá đơn";
			this.label23.TextAlign = ContentAlignment.MiddleCenter;
			this.dataGridViewTextBoxColumn2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn2.DataPropertyName = "CreateDate";
			dataGridViewCellStyle11.Format = "D";
			dataGridViewCellStyle11.NullValue = null;
			this.dataGridViewTextBoxColumn2.DefaultCellStyle = dataGridViewCellStyle11;
			this.dataGridViewTextBoxColumn2.HeaderText = "Ngày lập";
			this.dataGridViewTextBoxColumn2.MinimumWidth = 88;
			this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
			this.dataGridViewTextBoxColumn2.ReadOnly = true;
			this.dataGridViewTextBoxColumn2.Visible = false;
			this.dataGridViewTextBoxColumn2.Width = 88;
			this.dataGridViewTextBoxColumn3.DataPropertyName = "TotalMoney";
			this.dataGridViewTextBoxColumn3.HeaderText = "TotalMoney";
			this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
			this.dataGridViewTextBoxColumn3.ReadOnly = true;
			this.dataGridViewTextBoxColumn3.Visible = false;
			this.dataGridViewTextBoxColumn4.DataPropertyName = "TypeInput";
			this.dataGridViewTextBoxColumn4.HeaderText = "TypeInput";
			this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
			this.dataGridViewTextBoxColumn4.ReadOnly = true;
			this.dataGridViewTextBoxColumn4.Visible = false;
			this.dataGridViewTextBoxColumn5.DataPropertyName = "WID";
			this.dataGridViewTextBoxColumn5.HeaderText = "WID";
			this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
			this.dataGridViewTextBoxColumn5.ReadOnly = true;
			this.dataGridViewTextBoxColumn5.Visible = false;
			this.dataGridViewTextBoxColumn6.DataPropertyName = "Note";
			this.dataGridViewTextBoxColumn6.HeaderText = "Note";
			this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
			this.dataGridViewTextBoxColumn6.ReadOnly = true;
			this.dataGridViewTextBoxColumn6.Visible = false;
			this.dataGridViewTextBoxColumn8.HeaderText = "Tên khách hàng";
			this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8";
			this.dataGridViewTextBoxColumn8.ReadOnly = true;
			this.dataGridViewTextBoxColumn8.Visible = false;
			this.dataGridViewTextBoxColumn9.HeaderText = "Tuổi";
			this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9";
			this.dataGridViewTextBoxColumn9.ReadOnly = true;
			this.dataGridViewTextBoxColumn9.Visible = false;
			this.dataGridViewTextBoxColumn10.HeaderText = "Giới tính";
			this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10";
			this.dataGridViewTextBoxColumn10.ReadOnly = true;
			this.dataGridViewTextBoxColumn10.Visible = false;
			this.dataGridViewTextBoxColumn11.HeaderText = "Địa chỉ";
			this.dataGridViewTextBoxColumn11.Name = "dataGridViewTextBoxColumn11";
			this.dataGridViewTextBoxColumn11.ReadOnly = true;
			this.dataGridViewTextBoxColumn11.Visible = false;
			this.dataGridViewTextBoxColumn12.HeaderText = "Điện thoại";
			this.dataGridViewTextBoxColumn12.Name = "dataGridViewTextBoxColumn12";
			this.dataGridViewTextBoxColumn12.ReadOnly = true;
			this.dataGridViewTextBoxColumn12.Visible = false;
			this.dataGridViewTextBoxColumn13.DataPropertyName = "UserName";
			this.dataGridViewTextBoxColumn13.HeaderText = "Tài khoản";
			this.dataGridViewTextBoxColumn13.Name = "dataGridViewTextBoxColumn13";
			this.dataGridViewTextBoxColumn13.ReadOnly = true;
			this.dataGridViewTextBoxColumn13.Visible = false;
			this.dataGridViewTextBoxColumn14.DataPropertyName = "FullName";
			this.dataGridViewTextBoxColumn14.HeaderText = "Tên tài khoản";
			this.dataGridViewTextBoxColumn14.Name = "dataGridViewTextBoxColumn14";
			this.dataGridViewTextBoxColumn14.ReadOnly = true;
			this.dataGridViewTextBoxColumn14.Visible = false;
			this.dataGridViewTextBoxColumn15.DataPropertyName = "Printed";
			this.dataGridViewTextBoxColumn15.HeaderText = "Printed";
			this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15";
			this.dataGridViewTextBoxColumn15.ReadOnly = true;
			this.dataGridViewTextBoxColumn15.Visible = false;
			this.dataGridViewTextBoxColumn16.DataPropertyName = "_DoctorDesease";
			this.dataGridViewTextBoxColumn16.HeaderText = "_DoctorDesease";
			this.dataGridViewTextBoxColumn16.Name = "dataGridViewTextBoxColumn16";
			this.dataGridViewTextBoxColumn16.ReadOnly = true;
			this.dataGridViewTextBoxColumn16.Visible = false;
			this.dataGridViewTextBoxColumn17.DataPropertyName = "_CusFreeID";
			this.dataGridViewTextBoxColumn17.HeaderText = "_CusFreeID";
			this.dataGridViewTextBoxColumn17.Name = "dataGridViewTextBoxColumn17";
			this.dataGridViewTextBoxColumn17.ReadOnly = true;
			this.dataGridViewTextBoxColumn17.Visible = false;
			this.dataGridViewTextBoxColumn18.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.dataGridViewTextBoxColumn18.DataPropertyName = "productName";
			this.dataGridViewTextBoxColumn18.HeaderText = "Sản phẩm";
			this.dataGridViewTextBoxColumn18.MinimumWidth = 183;
			this.dataGridViewTextBoxColumn18.Name = "dataGridViewTextBoxColumn18";
			this.dataGridViewTextBoxColumn18.ReadOnly = true;
			this.dataGridViewTextBoxColumn18.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn19.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn19.DataPropertyName = "Packet";
			this.dataGridViewTextBoxColumn19.HeaderText = "Số lô";
			this.dataGridViewTextBoxColumn19.MinimumWidth = 95;
			this.dataGridViewTextBoxColumn19.Name = "dataGridViewTextBoxColumn19";
			this.dataGridViewTextBoxColumn19.ReadOnly = true;
			this.dataGridViewTextBoxColumn19.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn19.Width = 95;
			this.dataGridViewTextBoxColumn20.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn20.DataPropertyName = "productUnit";
			this.dataGridViewTextBoxColumn20.HeaderText = "Đơn vị tính";
			this.dataGridViewTextBoxColumn20.MinimumWidth = 86;
			this.dataGridViewTextBoxColumn20.Name = "dataGridViewTextBoxColumn20";
			this.dataGridViewTextBoxColumn20.ReadOnly = true;
			this.dataGridViewTextBoxColumn20.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn20.Width = 86;
			this.dataGridViewTextBoxColumn21.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn21.DataPropertyName = "productNumber";
			dataGridViewCellStyle12.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle12.Format = "N0";
			dataGridViewCellStyle12.NullValue = null;
			this.dataGridViewTextBoxColumn21.DefaultCellStyle = dataGridViewCellStyle12;
			this.dataGridViewTextBoxColumn21.HeaderText = "Số lượng";
			this.dataGridViewTextBoxColumn21.MinimumWidth = 78;
			this.dataGridViewTextBoxColumn21.Name = "dataGridViewTextBoxColumn21";
			this.dataGridViewTextBoxColumn21.ReadOnly = true;
			this.dataGridViewTextBoxColumn21.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn21.Width = 78;
			this.dataGridViewTextBoxColumn22.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn22.DataPropertyName = "productPrice2";
			dataGridViewCellStyle13.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle13.Format = "N0";
			dataGridViewCellStyle13.NullValue = null;
			this.dataGridViewTextBoxColumn22.DefaultCellStyle = dataGridViewCellStyle13;
			this.dataGridViewTextBoxColumn22.HeaderText = "Đơn giá";
			this.dataGridViewTextBoxColumn22.MinimumWidth = 84;
			this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22";
			this.dataGridViewTextBoxColumn22.ReadOnly = true;
			this.dataGridViewTextBoxColumn22.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn22.Width = 84;
			this.dataGridViewTextBoxColumn23.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn23.DataPropertyName = "VATasMoney";
			dataGridViewCellStyle14.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle14.Format = "N2";
			dataGridViewCellStyle14.NullValue = "0";
			this.dataGridViewTextBoxColumn23.DefaultCellStyle = dataGridViewCellStyle14;
			this.dataGridViewTextBoxColumn23.HeaderText = "VAT";
			this.dataGridViewTextBoxColumn23.MinimumWidth = 78;
			this.dataGridViewTextBoxColumn23.Name = "dataGridViewTextBoxColumn23";
			this.dataGridViewTextBoxColumn23.ReadOnly = true;
			this.dataGridViewTextBoxColumn23.Width = 78;
			this.dataGridViewTextBoxColumn24.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn24.DataPropertyName = "ProductMoney";
			dataGridViewCellStyle15.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle15.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			dataGridViewCellStyle15.ForeColor = Color.Blue;
			dataGridViewCellStyle15.Format = "N0";
			dataGridViewCellStyle15.NullValue = null;
			this.dataGridViewTextBoxColumn24.DefaultCellStyle = dataGridViewCellStyle15;
			this.dataGridViewTextBoxColumn24.HeaderText = "Thành tiền";
			this.dataGridViewTextBoxColumn24.MinimumWidth = 97;
			this.dataGridViewTextBoxColumn24.Name = "dataGridViewTextBoxColumn24";
			this.dataGridViewTextBoxColumn24.ReadOnly = true;
			this.dataGridViewTextBoxColumn24.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.dataGridViewTextBoxColumn24.Width = 97;
			this.dataGridViewTextBoxColumn25.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn25.DataPropertyName = "ProductDate";
			dataGridViewCellStyle16.Format = "dd/MM/yyyy";
			this.dataGridViewTextBoxColumn25.DefaultCellStyle = dataGridViewCellStyle16;
			this.dataGridViewTextBoxColumn25.HeaderText = "Ngày SX";
			this.dataGridViewTextBoxColumn25.MinimumWidth = 80;
			this.dataGridViewTextBoxColumn25.Name = "dataGridViewTextBoxColumn25";
			this.dataGridViewTextBoxColumn25.ReadOnly = true;
			this.dataGridViewTextBoxColumn25.Visible = false;
			this.dataGridViewTextBoxColumn25.Width = 80;
			this.dataGridViewTextBoxColumn26.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn26.DataPropertyName = "ProductExpiryDate";
			dataGridViewCellStyle17.Format = "dd/MM/yyyy";
			this.dataGridViewTextBoxColumn26.DefaultCellStyle = dataGridViewCellStyle17;
			this.dataGridViewTextBoxColumn26.HeaderText = "Hạn dùng";
			this.dataGridViewTextBoxColumn26.MinimumWidth = 90;
			this.dataGridViewTextBoxColumn26.Name = "dataGridViewTextBoxColumn26";
			this.dataGridViewTextBoxColumn26.ReadOnly = true;
			this.dataGridViewTextBoxColumn26.Visible = false;
			this.dataGridViewTextBoxColumn26.Width = 90;
			this.dataGridViewTextBoxColumn27.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.dataGridViewTextBoxColumn27.DataPropertyName = "Pid";
			this.dataGridViewTextBoxColumn27.HeaderText = "Mã sản phẩm";
			this.dataGridViewTextBoxColumn27.Name = "dataGridViewTextBoxColumn27";
			this.dataGridViewTextBoxColumn27.ReadOnly = true;
			this.dataGridViewTextBoxColumn27.Visible = false;
			this.dataGridViewTextBoxColumn28.DataPropertyName = "productPrice1";
			this.dataGridViewTextBoxColumn28.HeaderText = "Giá bán buôn";
			this.dataGridViewTextBoxColumn28.Name = "dataGridViewTextBoxColumn28";
			this.dataGridViewTextBoxColumn28.ReadOnly = true;
			this.dataGridViewTextBoxColumn28.Visible = false;
			this.dataGridViewTextBoxColumn29.DataPropertyName = "productPrice";
			this.dataGridViewTextBoxColumn29.HeaderText = "Giá nhập";
			this.dataGridViewTextBoxColumn29.Name = "dataGridViewTextBoxColumn29";
			this.dataGridViewTextBoxColumn29.ReadOnly = true;
			this.dataGridViewTextBoxColumn29.Visible = false;
			this.dataGridViewTextBoxColumn30.DataPropertyName = "NationalID";
			this.dataGridViewTextBoxColumn30.HeaderText = "NationalID";
			this.dataGridViewTextBoxColumn30.Name = "dataGridViewTextBoxColumn30";
			this.dataGridViewTextBoxColumn30.ReadOnly = true;
			this.dataGridViewTextBoxColumn30.Visible = false;
			this.dataGridViewTextBoxColumn31.DataPropertyName = "VAT";
			this.dataGridViewTextBoxColumn31.HeaderText = "VAT";
			this.dataGridViewTextBoxColumn31.Name = "dataGridViewTextBoxColumn31";
			this.dataGridViewTextBoxColumn31.ReadOnly = true;
			this.dataGridViewTextBoxColumn31.Visible = false;
			this.dataGridViewTextBoxColumn32.DataPropertyName = "possName";
			this.dataGridViewTextBoxColumn32.HeaderText = "possName";
			this.dataGridViewTextBoxColumn32.Name = "dataGridViewTextBoxColumn32";
			this.dataGridViewTextBoxColumn32.ReadOnly = true;
			this.dataGridViewTextBoxColumn32.Visible = false;
			this.dataGridViewTextBoxColumn33.DataPropertyName = "Rate";
			dataGridViewCellStyle18.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle18.NullValue = "1";
			this.dataGridViewTextBoxColumn33.DefaultCellStyle = dataGridViewCellStyle18;
			this.dataGridViewTextBoxColumn33.HeaderText = "Rate";
			this.dataGridViewTextBoxColumn33.Name = "dataGridViewTextBoxColumn33";
			this.dataGridViewTextBoxColumn33.ReadOnly = true;
			this.dataGridViewTextBoxColumn33.Visible = false;
			this.dataGridViewTextBoxColumn34.DataPropertyName = "IdRegisters";
			this.dataGridViewTextBoxColumn34.HeaderText = "IdRegisters";
			this.dataGridViewTextBoxColumn34.Name = "dataGridViewTextBoxColumn34";
			this.dataGridViewTextBoxColumn34.ReadOnly = true;
			this.dataGridViewTextBoxColumn34.Visible = false;
			this.dataGridViewTextBoxColumn35.DataPropertyName = "IdControl";
			this.dataGridViewTextBoxColumn35.HeaderText = "IdControl";
			this.dataGridViewTextBoxColumn35.Name = "dataGridViewTextBoxColumn35";
			this.dataGridViewTextBoxColumn35.ReadOnly = true;
			this.dataGridViewTextBoxColumn35.Visible = false;
			this.dataGridViewTextBoxColumn36.DataPropertyName = "IdBisMake";
			this.dataGridViewTextBoxColumn36.HeaderText = "IdBisMake";
			this.dataGridViewTextBoxColumn36.Name = "dataGridViewTextBoxColumn36";
			this.dataGridViewTextBoxColumn36.ReadOnly = true;
			this.dataGridViewTextBoxColumn36.Visible = false;
			this.dataGridViewTextBoxColumn37.DataPropertyName = "IdBisImport";
			this.dataGridViewTextBoxColumn37.HeaderText = "IdBisImport";
			this.dataGridViewTextBoxColumn37.Name = "dataGridViewTextBoxColumn37";
			this.dataGridViewTextBoxColumn37.ReadOnly = true;
			this.dataGridViewTextBoxColumn37.Visible = false;
			this.dataGridViewTextBoxColumn38.DataPropertyName = "BarCode";
			this.dataGridViewTextBoxColumn38.HeaderText = "BarCode";
			this.dataGridViewTextBoxColumn38.Name = "dataGridViewTextBoxColumn38";
			this.dataGridViewTextBoxColumn38.ReadOnly = true;
			this.dataGridViewTextBoxColumn38.Visible = false;
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(950, 600);
			base.Controls.Add(this.label23);
			base.Controls.Add(this.label29);
			base.Controls.Add(this.button2);
			base.Controls.Add(this.button1);
			base.Controls.Add(this.txtVAT);
			base.Controls.Add(this.txtTotalVAT);
			base.Controls.Add(this.label13);
			base.Controls.Add(this.lblMoney);
			base.Controls.Add(this.btnStopSlide);
			base.Controls.Add(this.dgvProduct);
			base.Controls.Add(this.txtMoneyAfterDiscount);
			base.Controls.Add(this.txtDiscountOut);
			base.Controls.Add(this.label11);
			base.Controls.Add(this.txtMoney);
			base.Controls.Add(this.label10);
			base.Controls.Add(this.txtProductNumber);
			base.Controls.Add(this.txtProductPrice);
			base.Controls.Add(this.btnSelect);
			base.Controls.Add(this.lblProduct);
			base.Controls.Add(this.lblPrice);
			base.Controls.Add(this.cbbPacket);
			base.Controls.Add(this.lblNumber);
			base.Controls.Add(this.lblUnit);
			base.Controls.Add(this.label19);
			base.Controls.Add(this.lblPacket);
			base.Controls.Add(this.txtProductName);
			base.Controls.Add(this.groupBox4);
			base.Controls.Add(this.lblPossName);
			base.Controls.Add(this.cbbWareHouse);
			base.Controls.Add(this.txtDoctorDesease);
			base.Controls.Add(this.label22);
			base.Controls.Add(this.label4);
			base.Controls.Add(this.txtNote);
			base.Controls.Add(this.label9);
			base.Controls.Add(this.btnSearch);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.btnDel);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.txtTotalMoney);
			base.Controls.Add(this.label7);
			base.Controls.Add(this.txtProductMoney);
			base.Controls.Add(this.btnSave);
			base.Controls.Add(this.label12);
			base.Controls.Add(this.btnEdit);
			base.Controls.Add(this.btnAdd);
			base.Controls.Add(this.groupBox3);
			base.Controls.Add(this.label26);
			base.Controls.Add(this.dgvBill);
			base.Controls.Add(this.label14);
			base.Controls.Add(this.btnAddToBill);
			base.Controls.Add(this.txtBalancerAllPacket);
			base.Controls.Add(this.txtProductUnit);
			base.Controls.Add(this.label27);
			base.Controls.Add(this.label21);
			base.Controls.Add(this.btnListUnit);
			base.Controls.Add(this.dtpProductDate);
			base.Controls.Add(this.dptProductExpiryDate);
			base.Controls.Add(this.cbbNational);
			base.Controls.Add(this.txtBalancer);
			base.Controls.Add(this.label15);
			base.Controls.Add(this.label20);
			base.Controls.Add(this.label16);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 0);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			//base.Icon = (Icon)componentResourceManager.GetObject("$this.Icon");
			base.KeyPreview = true;
			base.Name = "frmOutputRetail";
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "BÁN LẺ";
			base.Load += new EventHandler(this.frmOutputRetail_Load);
			base.Shown += new EventHandler(this.frmOutputRetail_Shown);
			base.FormClosing += new FormClosingEventHandler(this.frmOutputRetail_FormClosing);
			base.KeyDown += new KeyEventHandler(this.frmOutputRetail_KeyDown);
			this.groupBox3.ResumeLayout(false);
			((ISupportInitialize)this.dgvBill).EndInit();
			this.ctmJustBill.ResumeLayout(false);
			((ISupportInitialize)this.dgvProduct).EndInit();
			this.cmsBill.ResumeLayout(false);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			this.groupBox4.ResumeLayout(false);
			this.groupBox4.PerformLayout();
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
